Entropy¶
Returns the Shannon information entropy of the categorical distribution of a list's elements. Without a base the entropy is measured in nats (natural log).
Entropy[b, list] measures the entropy in base b. When the category counts
make the rebased logarithms land on exact powers of the base, the result
collapses to an integer.
Otherwise it stays as a logarithm ratio.