gr.demokritos.iit.jinsect.algorithms.statistics
Class KLDivergenceCalculator

java.lang.Object
  extended by gr.demokritos.iit.jinsect.algorithms.statistics.KLDivergenceCalculator

public class KLDivergenceCalculator
extends java.lang.Object

Computes the entropy based KL Divergence between two distributions


Constructor Summary
KLDivergenceCalculator()
           
 
Method Summary
static double KL_asymmetric(Distribution p, Distribution q)
          The static method where the computation of KL_asymmetric is performed.
static double KL_symmetric(Distribution p, Distribution q)
          The static method where the computation of symmetric KL is performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KLDivergenceCalculator

public KLDivergenceCalculator()
Method Detail

KL_asymmetric

public static double KL_asymmetric(Distribution p,
                                   Distribution q)
The static method where the computation of KL_asymmetric is performed. This measure is asymmetric and non-negative.

Parameters:
p - the first Distribution.
q - the second Distribution.
Returns:
zero if q and p are equal

KL_symmetric

public static double KL_symmetric(Distribution p,
                                  Distribution q)
The static method where the computation of symmetric KL is performed. This measure is symmetric and non-negative.

Parameters:
p - the first Distribution.
q - the second Distribution.
Returns:
zero if q and p are equal