Creates a configuration object for computing Mahalanobis dissimilarity.
Pass the result to dissimilarity() to compute the dissimilarity
matrix.
The Mahalanobis distance is computed by first transforming the data into Mahalanobis space via a factorization of the inverse covariance matrix \(M^{-1} = W^{T}W\) (using SVD), then applying Euclidean distance in that transformed space:
\[d(x_i, x_j) = \sqrt{\frac{1}{p}(x_i - x_j)M^{-1}(x_i - x_j)^T}\]
Important limitations
The covariance matrix will be singular — and the distance therefore
uncomputable — when the number of observations is smaller than the number
of variables, or when variables are perfectly collinear. This is common
with raw spectral data; consider using diss_euclidean() on
PCA scores instead.
