IMSL C# Numerical Library

DiscriminantAnalysis.GetMahalanobis Method 

Returns the Mahalanobis distances between the group means.

public double[,] GetMahalanobis();

Return Value

A nGroups\timesnGroups double array containing the Mahalanobis distances between the group means.

Remarks

For linear discrimination, the Mahalanobis distance

D_{ij}^2
between group means i and j is computed using the within covariance matrix for group i in place of the pooled covariance matrix.

See Also

DiscriminantAnalysis Class | Imsl.Stat Namespace