public class PearsonCorrelationDistanceMetric extends DistanceMetric<double[]>
| Constructor and Description |
|---|
PearsonCorrelationDistanceMetric(boolean abs)
Creates a new distance based on the Pearson correlation.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDistance(double[] o1,
double[] o2)
Returns the distance according to the metric of the two supplied objects.
|
getPairwiseDistanceMatrixpublic PearsonCorrelationDistanceMetric(boolean abs)
abs - if true, the distance is computed as
, otherwise as
.public double getDistance(double[] o1,
double[] o2)
throws Exception
DistanceMetricgetDistance in class DistanceMetric<double[]>o1 - the first objecto2 - the second objectException - if the distance could not be computed