Institut de Robòtica i Informàtica Industrial

GaussianKL

PURPOSE ^

Gaussian Kullback-Leibler distance.

SYNOPSIS ^

function d=GaussianKL(g1,g2)

DESCRIPTION ^

   Gaussian Kullback-Leibler distance.

   Computes the KL distance between two Gaussians.

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:
  • CompressGR Gaussian mixture compression using the Golberger and Roweis method.
  • Distance Approximated Kullback-Leibler distance between Gaussian mixture.

SOURCE CODE ^

0001 function d=GaussianKL(g1,g2)
0002 %   Gaussian Kullback-Leibler distance.
0003 %
0004 %   Computes the KL distance between two Gaussians.
0005 
0006   if g1.dim~=g2.dim
0007     error('Non coherent sizes in GaussianKL');
0008   end
0009   m12=(g2.m-g1.m);
0010   d=0.5*( log(g2.d/g1.d) + trace(g2.iS*g1.S) + m12'*g2.iS*m12 - g1.dim);
0011


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003