@Reference(authors="D. M. Endres, J. E. Schindelin", title="A new metric for probability distributions", booktitle="IEEE Transactions on Information Theory, 49(7)", url="https://doi.org/10.1109/TIT.2003.813506", bibkey="DBLP:journals/tit/EndresS03") public class SqrtJensenShannonDivergenceDistanceFunction extends JensenShannonDivergenceDistanceFunction
\[\sqrt{JS}(\vec{x},\vec{y}):=\sqrt{\tfrac12\sum\nolimits_i x_i\log\tfrac{2x_i}{x_i+y_i}+y_i\log\tfrac{2y_i}{x_i+y_i}} = \sqrt{JS(\vec{x},\vec{y})}\]
A proof of triangle inequality (for "\(D_{PQ}\)") can be found in Endres and Schindelin.
References:
D. M. Endres, J. E. Schindelin
A new metric for probability distributions
IEEE Transactions on Information Theory, 49(7)
Modifier and Type | Class and Description |
---|---|
static class |
SqrtJensenShannonDivergenceDistanceFunction.Parameterizer
Parameterization class, using the static instance.
|
Modifier and Type | Field and Description |
---|---|
static SqrtJensenShannonDivergenceDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
SqrtJensenShannonDivergenceDistanceFunction()
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 |
isMetric()
Is this distance function metric (satisfy the triangle inequality)
|
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() |
equals, hashCode
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
instantiate
getInputTypeRestriction
isSymmetric
public static final SqrtJensenShannonDivergenceDistanceFunction STATIC
@Deprecated public SqrtJensenShannonDivergenceDistanceFunction()
public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
distance
in class JensenShannonDivergenceDistanceFunction
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
minDist
in class JensenShannonDivergenceDistanceFunction
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean isMetric()
DistanceFunction
true
when metric.public boolean isSquared()
DistanceFunction
isSquared
in interface DistanceFunction<NumberVector>
isSquared
in class JeffreyDivergenceDistanceFunction
true
when squared.public java.lang.String toString()
toString
in class JensenShannonDivergenceDistanceFunction
Copyright © 2019 ELKI Development Team. License information.