Ardour
9.0-pre0-582-g084a23a80d
|
#include <KLDivergence.h>
Public Member Functions | |
KLDivergence () | |
~KLDivergence () | |
double | distanceGaussian (const vector< double > &means1, const vector< double > &variances1, const vector< double > &means2, const vector< double > &variances2) |
double | distanceDistribution (const vector< double > &d1, const vector< double > &d2, bool symmetrised) |
Helper methods for calculating Kullback-Leibler divergences.
Definition at line 26 of file KLDivergence.h.
|
inline |
Definition at line 29 of file KLDivergence.h.
|
inline |
Definition at line 30 of file KLDivergence.h.
double KLDivergence::distanceDistribution | ( | const vector< double > & | d1, |
const vector< double > & | d2, | ||
bool | symmetrised | ||
) |
Calculate a Kullback-Leibler divergence of two probability distributions. Input vectors must be of equal size. If symmetrised is true, the result will be the symmetrised distance (equal to KL(d1, d2) + KL(d2, d1)).
double KLDivergence::distanceGaussian | ( | const vector< double > & | means1, |
const vector< double > & | variances1, | ||
const vector< double > & | means2, | ||
const vector< double > & | variances2 | ||
) |
Calculate a symmetrised Kullback-Leibler divergence of Gaussian models based on mean and variance vectors. All input vectors must be of equal size.