# Entropy of the elements of a general data set

I have the following data set, and wish to track the evolution of the entropy of each element within the set. I have evaluated the entropy for some elements, but how does one evaluate the entropy of each element, going from the first to the last, and display the evolution of the entropy with time. This should be done for any general data for any number of elements. The time here is in fact the position of each element.

Data1 = {{1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 0}, {1, 1, 0, 0, 0, 0},
{1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 1},
{1, 1, 1, 0, 0, 1}, {1, 1, 1, 0, 0, 0},
{1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0},
{0, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0}};

N[Entropy[{1, 1, 1, 0, 0, 0}]]

N[Entropy[{1, 1, 1, 0, 0, 0}]]

N[Entropy[{1, 1, 0, 0, 0, 0}]]

N[Entropy[{0, 0, 0, 0, 0, 0}]]

(* 0.673012, 0.673012, 0.636514, 0 *)

• N[Entropy /@ Data1]? – kglr Mar 16 '15 at 5:08

Just for fun:

d = {{1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {1, 1, 0, 0, 0, 0}, {1,
1, 0, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 1}, {1, 1, 1,
0, 0, 1}, {1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0,
0}, {0, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0}, {0, 0, 1, 0, 0,
0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0}};
en = N[Entropy/@ d]

yields:{0.693147, 0.693147, 0.636514, 0.636514, 0.693147, 0.636514, \ 0.636514, 0.693147, 0.693147, 0.693147, 0.636514, 0.636514, 0.450561, \ 0.450561, 0.}

A visualization:

Show[MatrixPlot[d, Mesh -> All],
ListPlot[Thread[{7 + Reverse@en, Range[15] - 0.5}], Joined -> True,
PlotMarkers -> Automatic], GridLines -> {{7}, None}]

The blue line showing entropy...relative to axis

I believe this is what you seek:

ListPlot[Entropy /@ Data1]