Principal Component Analysis.Get Mahalanobis Distance 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#
A vector that contains the Mahalanobis distance of each observation.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
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. |