PrincipalComponentAnalysis.GetMahalanobisDistance Method

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

Definition

Namespace: Numerics.NET.Statistics.Multivariate
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
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

ArgumentOutOfRangeException

numberOfComponents is less than zero or greater than the total number of components.

InvalidOperationException

The model has not been fitted. Call the Fit() method first.

See Also