public class KolmogorovSmirnovDistanceFunction extends AbstractNumberVectorDistanceFunction
This distance function assumes there exist a natural order in the vectors, i.e. they should be some 1-dimensional histogram.
The distance is then defined as \[\text{KS}(\vec{x},\vec{y}) := \max_i |\frac{\sum_{j=1}^i x_j}{\sum_{j=1}^d x_j}| - |\frac{\sum_{j=1}^i y_j}{\sum_{j=1}^d y_j}| \] which is the maximum difference of the empirical CDFs, where the divisors normalize the distribution to 1.
Modifier and Type | Class and Description |
---|---|
static class |
KolmogorovSmirnovDistanceFunction.Parameterizer
Parameterization class, using the static instance.
|
Modifier and Type | Field and Description |
---|---|
static KolmogorovSmirnovDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
KolmogorovSmirnovDistanceFunction()
Deprecated.
Use static instance!
|
Modifier and Type | Method and 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() |
java.lang.String |
toString() |
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
instantiate
isMetric, isSquared, isSymmetric
public static final KolmogorovSmirnovDistanceFunction STATIC
@Deprecated public KolmogorovSmirnovDistanceFunction()
public double distance(NumberVector v1, NumberVector v2)
NumberVectorDistanceFunction
v1
- first vectorv2
- second vectorpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.