liveBook · Manning

Information gain

As explained in Grokking Machine Learning

Information gain is the reduction or change in entropy resulting from a data split.

Information gain is the change in entropy produced by a data split. In a decision tree, compare the entropy before the split with the average entropy afterward; lower post-split entropy indicates a better split. section 9.8 section 9.2

Choosing a split for app recommendations

In a dataset of app downloads, splitting users by age gives lower average entropy than splitting by platform. If the resulting leaves differ in size, weight each leaf’s entropy by its share of the samples. section 9.2 section 9.2

Table 9.2 A simplified version of the dataset in table 9.1, where the age column has been simplified to two categories, “young” and “adult” (view table figure)

Platform

Age

App

iPhone

Young

Atom Count

iPhone

Adult

Check Mate Mate

Android

Adult

Beehive Finder

iPhone

Adult

Check Mate Mate

Android

Young

Atom Count

Android

Young

Atom Count

The app-recommendation dataset includes platform, age, and downloaded app—the fields used to illustrate candidate splits. section 9.2

How Grokking Machine Learning covers it

How deep it goes
Defines gain as entropy change and uses weighted split entropies, while deferring deeper information-theory treatment.
Examples
Compares age and platform splits in an app-recommendation dataset, with age producing lower average entropy.
What it assumes
Introduces entropy as a measure of set purity and identifies homogeneous label sets as having zero entropy.
What you can do after
Evaluate candidate decision-tree splits by comparing average entropy and weighting leaves by sample share when sizes differ.
How it connects
Connects entropy change to decision-tree splitting and contrasts entropy-based selection with Gini impurity and accuracy.

Also explained in

Compare how 4 books explain information gain →

Related concepts

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