liveBook · Manning

Entropy

As explained in Machine Learning Algorithms in Depth

Entropy is a measure of uncertainty in a probability distribution, computed as the expected negative log probability.

Entropy measures uncertainty in a probability distribution. For class probabilities πₖ, it is the expected negative log probability: H = −Σₖ πₖ log πₖ. A pure decision-tree leaf has one class with probability 1 and entropy 0; a leaf with uncertain class membership has higher entropy. section 5.6

In a CART decision tree, entropy is an alternative to the Gini index for judging how well a split separates classes. The aim is to reduce leaf impurity while limiting tree depth to guard against overfitting. The worked threshold calculation uses Gini, not entropy. section 5.6

Entropy during image denoising

Mean-field variational inference tracks the average entropy of binary pixel distributions alongside its ELBO objective. In the reported Ising-model denoising run, average pixel entropy decreases over iterations while ELBO increases. section 3.3

For practice, compute H(X) for a Bernoulli random variable, alongside its expectation and variance. section 3.5

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines entropy through uncertainty and pure leaves, but works the CART threshold example with Gini rather than entropy.
Examples
Uses a Bernoulli calculation exercise and tracks average binary-pixel entropy during Ising-model image denoising.
What you can do after
Evaluate/understand it as a measure of leaf purity or changing pixel uncertainty, and practice computing it for a Bernoulli variable.
How it connects
Connects entropy to CART, the Gini index, Bernoulli distributions, mean-field variational inference, and the ELBO.

Also explained in

Compare how 13 books explain entropy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.