@Alias(value="chisq") @Priority(value=100) @Reference(authors="J. Puzicha, J. M. Buhmann, Y. Rubner, C. Tomasi", title="Empirical evaluation of dissimilarity measures for color and texture", booktitle="Proc. 7th IEEE International Conference on Computer Vision", url="https://doi.org/10.1109/ICCV.1999.790412", bibkey="DBLP:conf/iccv/PuzichaRTB99") public class ChiSquaredDistanceFunction extends AbstractNumberVectorDistanceFunction implements SpatialPrimitiveDistanceFunction<NumberVector>
This implementation assumes \(\sum_i x_i=\sum_i y_i\), and is defined as: \[\chi^2(\vec{x},\vec{y}):=2\sum\nolimits_i \tfrac{(x_i-x_i)^2}{x_i+y_i}\]
Reference:
J. Puzicha, J. M. Buhmann, Y. Rubner, C. Tomasi
Empirical evaluation of dissimilarity measures for color and texture
Proc. 7th IEEE International Conference on Computer Vision
Modifier and Type | Class and Description |
---|---|
static class |
ChiSquaredDistanceFunction.Parameterizer
Parameterization class, using the static instance.
|
Modifier and Type | Field and Description |
---|---|
static ChiSquaredDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
ChiSquaredDistanceFunction()
Deprecated.
Use static instance!
|
Modifier and Type | Method and Description |
---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
SimpleTypeInformation<? super NumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
hashCode() |
boolean |
isSquared()
Squared distances, that would become metric after square root.
|
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
java.lang.String |
toString() |
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
instantiate
isMetric, isSymmetric
public static final ChiSquaredDistanceFunction STATIC
@Deprecated public ChiSquaredDistanceFunction()
public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isSquared()
DistanceFunction
isSquared
in interface DistanceFunction<NumberVector>
true
when squared.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector>
getInputTypeRestriction
in class AbstractNumberVectorDistanceFunction
Copyright © 2019 ELKI Development Team. License information.