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.
|
getPairwiseDistanceMatrix
public PearsonCorrelationDistanceMetric(boolean abs)
abs
- if true
, the distance is computed as public double getDistance(double[] o1, double[] o2) throws Exception
DistanceMetric
getDistance
in class DistanceMetric<double[]>
o1
- the first objecto2
- the second objectException
- if the distance could not be computed