smile.math.distance
Class MahalanobisDistance
- java.lang.Object
-
- smile.math.distance.MahalanobisDistance
-
public class MahalanobisDistance extends java.lang.Object implements Metric<double[]>, java.io.Serializable
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description MahalanobisDistance(double[][] cov)Constructor with given covariance matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubled(double[] x, double[] y)Returns the distance measure between two objects.java.lang.StringtoString()
-
DataMelt 3.0 © DataMelt by jWork.ORG