No BSD License  

Highlights from
ENTROPY

Be the first to rate this file! 38 Downloads (last 30 days) File Size: 2.63 KB File ID: #12857

ENTROPY

by David Fass

 

02 Nov 2006 (Updated 02 Nov 2006)

Compute the Shannon entropy of a set of variables.

| Watch this File

File Information
Description

ENTROPY(X,P) returns the (joint) entropy for the joint distribution corresponding to object matrix X and probability vector P. Each row of MxN matrix X is an N-dimensional object, and P is a length-M vector containing the corresponding probabilities. Thus, the probability of object X(i,:) is P(i).

ENTROPY(X), with no probability vector specified, will assume a uniform distribution across the objects in X.
   
If X contains duplicate rows, these are assumed to be occurances of the same object, and the corresponding probabilities are added. (This is actually the only reason that object matrix X is needed -- to detect and merge repeated objects. Of course, the entropy itself only depends on the probability vector P.) Matrix X need NOT be an exhaustive list of all *possible* objects in the universe; objects that do not appear in X are simply assumed to have zero probability.

The elements of probability vector P must sum to 1 +/- .00001.

See also: MUTUALINFO

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
coding theory David Fass 22 Oct 2008 08:46:53
information theory David Fass 22 Oct 2008 08:46:53
information David Fass 22 Oct 2008 08:46:53
entropy David Fass 22 Oct 2008 08:46:53
joint entropy David Fass 22 Oct 2008 08:46:53
marginal David Fass 22 Oct 2008 08:46:53
mutualinfo x Zeng 03 Feb 2009 13:31:06
information theory Ankit Maroo 17 Apr 2009 06:30:28
joint entropy hima 02 Jul 2009 03:00:52
coding theory Cagri Ozcaglar 24 Mar 2010 15:57:41
entropy Tobias 11 May 2010 04:39:16
entropy Jing Tang 20 Jan 2012 10:58:01

Contact us at files@mathworks.com