public class KLDivergence extends Object implements SimilarityFunction
Vector
s.
This metric is not symmetric. Use the Jensen-Shannon Divergence for a
symmetric similarity measure between two probability distributionsConstructor and Description |
---|
KLDivergence() |
Modifier and Type | Method and Description |
---|---|
boolean |
isSymmetric()
Returns
false (is asymmetric). |
void |
setParams(double... arguments)
Does nothing
|
double |
sim(DoubleVector v1,
DoubleVector v2)
Returns the similarity between
v1 and v2 . |
double |
sim(IntegerVector v1,
IntegerVector v2)
Returns the similarity between
v1 and v2 . |
double |
sim(Vector v1,
Vector v2)
Returns the similarity between
v1 and v2 . |
public void setParams(double... arguments)
setParams
in interface SimilarityFunction
public boolean isSymmetric()
false
(is asymmetric).isSymmetric
in interface SimilarityFunction
public double sim(DoubleVector v1, DoubleVector v2)
v1
and v2
. If SimilarityFunction.isSymmetric()
is false, the ordering does matter.sim
in interface SimilarityFunction
public double sim(IntegerVector v1, IntegerVector v2)
v1
and v2
. If SimilarityFunction.isSymmetric()
is false, the ordering does matter.sim
in interface SimilarityFunction
public double sim(Vector v1, Vector v2)
v1
and v2
. If SimilarityFunction.isSymmetric()
is false, the ordering does matter.sim
in interface SimilarityFunction
Copyright © 2012. All Rights Reserved.