Package smile.math.distance
Class MahalanobisDistance
java.lang.Object
smile.math.distance.MahalanobisDistance
- All Implemented Interfaces:
Serializable
,ToDoubleBiFunction<double[],
,double[]> Distance<double[]>
,Metric<double[]>
In statistics, Mahalanobis distance is based on correlations between
variables by which different patterns can be identified and analyzed.
It is a useful way of determining similarity of an unknown sample set
to a known one. It differs from Euclidean distance in that it takes
into account the correlations of the data set and is scale-invariant,
i.e. not dependent on the scale of measurements.
- See Also:
-
Constructor Details
-
MahalanobisDistance
public MahalanobisDistance(double[][] cov) Constructor.- Parameters:
cov
- the covariance matrix.
-
-
Method Details