Home > freetb4matlab > info-theory > kullback_leibler_distance.m

kullback_leibler_distance

PURPOSE ^

%

SYNOPSIS ^

function dist=kullback_leibler_distance(P,Q)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} kullback_leibler_distance (@var{P}, @var{Q})
%
% @var{P} and @var{Q} are probability distribution functions of the 
% @math{Dkl(P,Q) = \sum_x{ -P(x).log(Q(x)) + P(x).log(P(x))}
%          = \sum_x{ -P(x).log(P(x)/Q(x))}}
%
% Compute the Kullback-Leibler distance of two probability distributions
% given, P & Q.
% @example
% @group
%          kullback_leibler_distance([0.2 0.3 0.5],[0.1 0.8 0.1]) 
%          @result{}   ans = 0.64910 
% @end group
% @end example
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003