Home > data-analysis > stats > event > event_entropy.m

event_entropy

PURPOSE ^

event_entropy_of_lengths(EVENT_DATA)

SYNOPSIS ^

function e = event_entropy_of_lengths(data)

DESCRIPTION ^

 event_entropy_of_lengths(EVENT_DATA) 

 This function takes a sequence of eye fixations (cevent) and treats each
 instance in a cevent as a distinct category. In this way, the whole cevent is
 viewed as a distribution and event lengths are viewed a probability. The
 function then calculates the entropy of the whole cevent. The idea is to
 capture the dynamics of cevent, both the number of instances and the lengths
 of those instances.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function e = event_entropy_of_lengths(data)
0002 % event_entropy_of_lengths(EVENT_DATA)
0003 %
0004 % This function takes a sequence of eye fixations (cevent) and treats each
0005 % instance in a cevent as a distinct category. In this way, the whole cevent is
0006 % viewed as a distribution and event lengths are viewed a probability. The
0007 % function then calculates the entropy of the whole cevent. The idea is to
0008 % capture the dynamics of cevent, both the number of instances and the lengths
0009 % of those instances.
0010 
0011 
0012 p = data(:,2) - data(:,1);
0013 p = p ./sum(p);
0014 e = -sum(log2(p) .* p);
0015

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005