PrincipalComponentAnalysis.GetMahalanobisDistance Method

Returns the Mahalanobis distance of the observations to the centroid of the observations.

Definition

Namespace: Extreme.Statistics.Multivariate
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public Vector<double> GetMahalanobisDistance(
	int numberOfComponents
)

Parameters

numberOfComponents  Int32
The number of components to include in the calculation.

Return Value

Vector<Double>
A vector that contains the Mahalanobis distance of each observation.

Exceptions

ArgumentOutOfRangeExceptionnumberOfComponents is less than zero or greater than the total number of components.
InvalidOperationExceptionThe model has not been fitted. Call the Fit() method first.

See Also