[go: up one dir, main page]

Menu

[e264ba]: / cwlib / MI.m  Maximize  Restore  History

Download this file

11 lines (9 with data), 168 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
function I=MI(P)
% mutual information I=H[xy]-H[x]-H[y]
px=sum(P,1);
py=sum(P,2);
I=-H(P)+H(px)+H(py);
% ignore larger-than-possible values`
%% if I>1.1
%% I=0
%% end