smile.math.distance
Class CorrelationDistance
- java.lang.Object
-
- smile.math.distance.CorrelationDistance
-
- All Implemented Interfaces:
- java.io.Serializable, Distance<double[]>
public class CorrelationDistance extends java.lang.Object implements Distance<double[]>, java.io.Serializable
Correlation distance is defined as 1 - correlation coefficient.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description CorrelationDistance()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubled(double[] x, double[] y)Pearson correlation distance between the two arrays of type double.static doublekendall(double[] x, double[] y)Kendall rank correlation distance between the two arrays of type double.static doublekendall(float[] x, float[] y)Kendall rank correlation distance between the two arrays of type float.static doublekendall(int[] x, int[] y)Kendall rank correlation distance between the two arrays of type int.static doublepearson(double[] x, double[] y)Pearson correlation distance between the two arrays of type double.static doublepearson(float[] x, float[] y)Pearson correlation distance between the two arrays of type float.static doublepearson(int[] x, int[] y)Pearson correlation distance between the two arrays of type int.static doublespearman(double[] x, double[] y)Spearman correlation distance between the two arrays of type double.static doublespearman(float[] x, float[] y)Spearman correlation distance between the two arrays of type float.static doublespearman(int[] x, int[] y)Spearman correlation distance between the two arrays of type int.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
d
public double d(double[] x, double[] y)Pearson correlation distance between the two arrays of type double.
-
pearson
public static double pearson(int[] x, int[] y)Pearson correlation distance between the two arrays of type int.
-
pearson
public static double pearson(float[] x, float[] y)Pearson correlation distance between the two arrays of type float.
-
pearson
public static double pearson(double[] x, double[] y)Pearson correlation distance between the two arrays of type double.
-
spearman
public static double spearman(int[] x, int[] y)Spearman correlation distance between the two arrays of type int.
-
spearman
public static double spearman(float[] x, float[] y)Spearman correlation distance between the two arrays of type float.
-
spearman
public static double spearman(double[] x, double[] y)Spearman correlation distance between the two arrays of type double.
-
kendall
public static double kendall(int[] x, int[] y)Kendall rank correlation distance between the two arrays of type int.
-
kendall
public static double kendall(float[] x, float[] y)Kendall rank correlation distance between the two arrays of type float.
-
kendall
public static double kendall(double[] x, double[] y)Kendall rank correlation distance between the two arrays of type double.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG