Package elki.distance.correlation
Class SquaredUncenteredCorrelationDistance
- java.lang.Object
-
- elki.distance.AbstractNumberVectorDistance
-
- elki.distance.correlation.SquaredUncenteredCorrelationDistance
-
- All Implemented Interfaces:
Distance<NumberVector>,NumberVectorDistance<NumberVector>,PrimitiveDistance<NumberVector>
public class SquaredUncenteredCorrelationDistance extends AbstractNumberVectorDistance
Squared uncentered correlation distance function for feature vectors. This is highly similar toSquaredPearsonCorrelationDistance, but uses a fixed mean of 0 instead of the sample mean.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSquaredUncenteredCorrelationDistance.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description static SquaredUncenteredCorrelationDistanceSTATICStatic instance.
-
Constructor Summary
Constructors Constructor Description SquaredUncenteredCorrelationDistance()Deprecated.Use static instance!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledistance(NumberVector v1, NumberVector v2)Computes the distance between two given vectors according to this distance function.booleanequals(java.lang.Object obj)inthashCode()booleanisSquared()Squared distances, that would become metric after square root.java.lang.StringtoString()-
Methods inherited from class elki.distance.AbstractNumberVectorDistance
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.distance.Distance
isMetric, isSymmetric
-
Methods inherited from interface elki.distance.PrimitiveDistance
instantiate
-
-
-
-
Field Detail
-
STATIC
public static final SquaredUncenteredCorrelationDistance STATIC
Static instance.
-
-
Constructor Detail
-
SquaredUncenteredCorrelationDistance
@Deprecated public SquaredUncenteredCorrelationDistance()
Deprecated.Use static instance!Constructor - useSTATICinstead.
-
-
Method Detail
-
distance
public double distance(NumberVector v1, NumberVector v2)
Description copied from interface:NumberVectorDistanceComputes the distance between two given vectors according to this distance function.- Parameters:
v1- first vectorv2- second vector- Returns:
- the distance between two given vectors according to this distance function
-
isSquared
public boolean isSquared()
Description copied from interface:DistanceSquared distances, that would become metric after square root.E.g. squared Euclidean.
- Returns:
truewhen squared.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-