liveBook · Manning

Information gain

As explained in Statistics Every Programmer Needs

Information gain is the reduction in uncertainty about a target produced by a partition or feature.

Information gain measures how much a partition reduces uncertainty about a target. Decision-tree algorithms use it to compare candidate feature splits for classification, while regression trees use error-based criteria such as mean squared error or mean absolute error. section 6.1

For a classification split, entropy measures impurity or disorder before and after partitioning; information gain is the resulting reduction in entropy. Higher reduction indicates a more informative split. Gini impurity evaluates split quality differently and commonly computes faster, while entropy can be more sensitive to changes in class probabilities. section 6.3.2

Use information gain within a practical tree-building workflow:

  • Compare candidate feature splits by their reduction in classification uncertainty. section 6.1
  • Select entropy as the decision-tree criterion when using an information-gain-based impurity measure. section 6.3.2
  • Control tree complexity with parameters such as max_depth to reduce overfitting while building the tree. section 6.3.2

How Statistics Every Programmer Needs covers it

How deep it goes
Defines entropy-based reduction and contrasts it with Gini impurity, but does not derive the entropy formula.
Examples
Uses entropy as a DecisionTreeClassifier criterion and contrasts it with the default Gini criterion.
What it assumes
Assumes classification-tree terminology and distinguishes classification impurity measures from regression error criteria.
What you can do after
Apply it via decision-tree criteria to evaluate classification splits and configure model complexity.
How it connects
Connects information gain to decision trees, entropy, Gini impurity, pruning, and random forests.

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 Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.