public class WeightedSquaredPearsonCorrelationDistanceFunction extends AbstractNumberVectorDistanceFunction implements WeightedNumberVectorDistanceFunction<NumberVector>
r
as: 1-r
2
. Hence, possible values of this distance are between 0
and 1.
The distance between two vectors will be low (near 0), if their attribute
values are dimension-wise strictly positively or negatively correlated. For
Features with uncorrelated attributes, the distance value will be high (near
1).
This variation is for weighted dimensions.Modifier and Type | Class and Description |
---|---|
static class |
WeightedSquaredPearsonCorrelationDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private double[] |
weights
Weights
|
WEIGHTS_ID
Constructor and Description |
---|
WeightedSquaredPearsonCorrelationDistanceFunction(double[] weights)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the squared Pearson correlation distance for two given feature
vectors.
|
boolean |
equals(Object obj) |
dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
instantiate, isMetric, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputTypeRestriction
instantiate, isMetric, isSymmetric
public WeightedSquaredPearsonCorrelationDistanceFunction(double[] weights)
weights
- Weightspublic double distance(NumberVector v1, NumberVector v2)
r
as: 1-r
2
. Hence, possible values of this distance are between 0
and 1.distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
distance
in class AbstractPrimitiveDistanceFunction<NumberVector>
v1
- first feature vectorv2
- second feature vectorCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.