[Master Index] [Index for export/brede]

brede_mat_mutualinfo

(export/brede/brede_mat_mutualinfo.m)


Function Synopsis

I = brede_mat_mutualinfo(M, varargin)

Help text

 brede_mat_mutualinfo - Mutual information 

       mi = brede_mat_mutualinfo(M)

       Input:    M   'Mat' structure or matrix

       Property: Output  [ {scalar} | matrix ]

       Output:   I   Mutual information as a scalar or 'mat'
                     structure 

       Computes the mutual information for a matrix, when it is
       considered as a two-way contingency table. The mutual
       information is computed as:

            sum P(i,j) * log[ P(i,j) / ( P(i) P(j) ) ]
            i,j

       The natural logarithm is used for the log. A matrix containing
       absolute frequencies (counts) instead of probabilities can
       also be used as input.

       If 'output'='matrix' then the sum over i and j is not made and
       a matrix is returned.

       See also BREDE, BREDE_MAT.

 $Id: brede_mat_mutualinfo.m,v 1.2 2003/06/06 22:55:16 fnielsen Exp $

Produced by mat2html on Fri Jun 20 17:43:05 2008
Cross-Directory links are: OFF