@Reference(authors="S. Kullback", title="Information theory and statistics", booktitle="", bibkey="books/dover/Kullback59") @Alias(value="kl") public class KullbackLeiblerDivergenceAsymmetricDistanceFunction extends AbstractNumberVectorDistanceFunction
\[KL(\vec{x},\vec{y}):=\sum\nolimits_i x_i\log\tfrac{x_i}{y_i}\]
For a version with the arguments reversed, see
KullbackLeiblerDivergenceReverseAsymmetricDistanceFunction
.
For a symmetric version, see JeffreyDivergenceDistanceFunction
.
Reference:
S. Kullback
Information theory and statistics
Modifier and Type | Class and Description |
---|---|
static class |
KullbackLeiblerDivergenceAsymmetricDistanceFunction.Parameterizer
Parameterization class, using the static instance.
|
Modifier and Type | Field and Description |
---|---|
static KullbackLeiblerDivergenceAsymmetricDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
KullbackLeiblerDivergenceAsymmetricDistanceFunction()
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() |
boolean |
isSymmetric()
Is this function symmetric?
|
java.lang.String |
toString() |
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
instantiate
isMetric, isSquared
public static final KullbackLeiblerDivergenceAsymmetricDistanceFunction STATIC
@Deprecated public KullbackLeiblerDivergenceAsymmetricDistanceFunction()
public double distance(NumberVector v1, NumberVector v2)
NumberVectorDistanceFunction
v1
- first vectorv2
- second vectorpublic boolean isSymmetric()
DistanceFunction
true
when symmetricpublic 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.