Expand description
Entropy and related information measures (in bits).
See the book entry Entropy, divergence and mutual information.
Functions§
- cross_
entropy - The cross entropy
-Σ p log2 qin bits. Infinite ifqis zero wherepis positive. ReturnsNaNif the slices differ in length or contain negative values. - entropy
- The Shannon entropy of the byte distribution of
data, in bits per byte (0 to 8). Empty input has zero entropy. - entropy_
from_ probabilities - The Shannon entropy in bits of a probability distribution. Probabilities should sum to 1;
zero entries contribute nothing. Returns
NaNif any entry is negative or non-finite. - kl_
divergence - The Kullback-Leibler divergence
Σ p log2(p / q)in bits. - mutual_
information - The mutual information in bits of a joint distribution given as a row-major
rows x colsprobability table.