No BSD License  

4.66667
4.7 | 3 ratings Rate this file 172 Downloads (last 30 days) File Size: 982 Bytes File ID: #20688

Kullback-Leibler Divergence

by

Nima Razavi (view profile)

 

13 Jul 2008 (Updated )

Calculates the Kullback-Leibler Divergence between two probability distributions

| Watch this File

File Information
Description

For the description of the divergence you can take a look at :
http://en.wikipedia.org/wiki/Kullback-Leibler_divergence

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
03 Dec 2014 hello_world

I have two probability matrix P and Q of size m x n and q x n each. How to calculate KL-divergence for these two matrices?

27 Apr 2014 Erkin

Erkin (view profile)

Shouldn't the log value be log2 instead of natural logarithm?

Comment only
18 Apr 2014 wang

wang (view profile)

Sir, can you give a detailed description of P and Q in this function? example better.

Comment only
07 Aug 2013 Maysam Shahedi

Maysam Shahedi (view profile)

 
18 Oct 2011 amjad khan

dear sir we need kld for feature selection in MRI brain image can some one help me

Comment only
07 May 2011 Hung nguyen  
07 Mar 2011 Nate Greene

Please note that the logarithms should be base 2 if calculating values in bits.

Comment only
14 Jul 2008 Dimitri Shvorob

Your implementation is third of its kind on FEX: please take time to search FEX for existing code before posting.

Comment only

Contact us