Home > freetb4matlab > info-theory > infoentr_seq.m

infoentr_seq

PURPOSE ^

% If just one input, calculates Shannon Information Entropy

SYNOPSIS ^

function H = infoentr_seq(x,y)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} infoentr_seq (@var{seq_x}, @var{seq_y})
% If just one input, calculates Shannon Information Entropy
% of the sequence x:
%      H(X) = @math{\sum_{x \in X} p(x) log2(1/p(x))}
%
% If two inputs, calculates joint entropy of the concurrent
% sequences x and y:
%   H(X,Y) = @math{\sum_{x \in X, y \in Y} p(x,y) log2(1/p(x,y))}
%
% @example
% @group
%          X=[1, 1, 2, 1, 1];
%          infoentr_seq(X)
%          infoentr_seq([1,2,2,2,1,1,1,1,1],[1,2,2,2,2,2,1,1,1])
% @end group
% @end example
% @end deftypefn
% @seealso{infogain_seq}

CROSS-REFERENCE INFORMATION ^

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