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 class
SquaredUncenteredCorrelationDistance.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static SquaredUncenteredCorrelationDistance
STATIC
Static instance.
-
Constructor Summary
Constructors Constructor Description SquaredUncenteredCorrelationDistance()
Deprecated.Use static instance!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(NumberVector v1, NumberVector v2)
Computes the distance between two given vectors according to this distance function.boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isSquared()
Squared distances, that would become metric after square root.java.lang.String
toString()
-
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 - useSTATIC
instead.
-
-
Method Detail
-
distance
public double distance(NumberVector v1, NumberVector v2)
Description copied from interface:NumberVectorDistance
Computes 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:Distance
Squared distances, that would become metric after square root.E.g. squared Euclidean.
- Returns:
true
when squared.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-