Ardour  9.0-pre0-582-g084a23a80d
KLDivergence Class Reference

#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)
 

Detailed Description

Helper methods for calculating Kullback-Leibler divergences.

Definition at line 26 of file KLDivergence.h.

Constructor & Destructor Documentation

◆ KLDivergence()

KLDivergence::KLDivergence ( )
inline

Definition at line 29 of file KLDivergence.h.

◆ ~KLDivergence()

KLDivergence::~KLDivergence ( )
inline

Definition at line 30 of file KLDivergence.h.

Member Function Documentation

◆ distanceDistribution()

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)).

◆ distanceGaussian()

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.


The documentation for this class was generated from the following file: