Principal Component Analysis.Get Mahalanobis Distance 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#
A vector that contains the Mahalanobis distance of each observation.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
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
Argument | numberOfComponents is less than zero or greater than the total number of components. |
Invalid | The model has not been fitted. Call the Fit() method first. |