Class Pearson
- java.lang.Object
-
- org.neo4j.gds.similarity.knn.metrics.Pearson
-
public final class Pearson extends java.lang.ObjectHere we compute Pearson correlation coefficient and turn that into a metric. We use the formula from https://en.wikipedia.org/wiki/Pearson_correlation_coefficient#For_a_sample for the Pearson computation. If input arrays are of different length we ignore the longer tail. In the end we turn Pearson's r into a metric moving it to the range 0..1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doubledoubleMetric(double[] a, double[] b)static doublefloatMetric(float[] a, float[] b)
-