Partition the same cases completely
A decision tree splits a parent node into children using a condition. Information gain compares label entropy before and after that split. Every case must enter exactly one child. Parent class counts therefore follow from child counts; entering unrelated parent and child totals could create an impossible partition.[1]
Use the same logarithm base for every entropy; here base2 givesunits of bits.[2]
Child sizes supply the weights. At equal entropy, a child with twice as many cases contributes twice as much residual uncertainty. An empty child haszero weight and contributes nothing; this does not claim an independently defined entropy measurement for an empty node.
Entropy reduction and local split choice
Binary labels A/B; the zero term is defined by its limit.
For a consistent partition,0≤IG≤H(Y),where H is the parent’s entropy. Identical child label proportions give IG=0; pure children give IG=H(Y). Greedy split selection seeks a useful local improvement. It proves neither an optimal full tree nor causality or performance on new data. Gini decrease is a different split criterion with different values.[1]
The calculator takes four integer cells:left A, left B, right A, right B. All marginal totals are derived from them. Since subtracting nearly equal entropies can erase very small gain, numerics use an equivalent information/KL formulation. An arbitrary clipping rule does not disguise negative arithmetic as valid gain.
Calculate unequal children and perfect separation
Example1: A small pure child
- Given
- Left(4 A,0B), right(2 A,6B);12cases total.
- Find
- Calculate count-weighted information gain.
Determine parent and child proportions.
Evaluate entropies with base2.
Weight by child sizes.
Result: Weighted residual entropy is about0.540852bits and IG about0.459148bits.
Check: Residual entropy plusgain returns1bit; child counts sum to(6 A,6B).
Example2: Perfect split of an imbalanced sample
- Given
- Left(3 A,0B), right(0 A,9B).
- Find
- Find IG and interpret itsmaximum.
Calculate the parent mixture.
Both pure children havezero entropy.
Result: The split gains all prior label entropy. A perfect split need not yield1bit.
Check: 0.811278bits does not exceed parent entropy. Comparing it directly with Example1 is not a fair split comparison because the parent distributions differ.
Recall the method later with the formula’s flashcards.
11 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
The balance contains three quantities
Before, residual and gain
Free with a Quanta account. Your download stays ready after registration.
Five weighted-split exercises
Calculate · Foundation
The left child has(2 A,0B), the right child(0 A,2B). Find IG in bits.
Show hint
The parent has(2 A,2B); both children are pure.
Learning goal: Calculate information gain for a perfect split.
Show solution and calculation
Hparent=1bit, Hleft=Hright=0.
IG=1−(1/2)×0−(1/2)×0=1bit.
The split completely separates labels on this sample.
Rearrange · Application
Hparent=1bit, IG=0.4bit; the left child has weight1/4 and zero entropy. Find right-child entropy.
Show hint
Weighted residual entropy is Hparent−IG.
Learning goal: Rearrange a weighted entropy contribution.
Show solution and calculation
0.6=(1/4)×0+(3/4)Hright.
Hence Hright=0.6/(3/4)=0.8bit.
This is a valid binary entropy value, but does not uniquely recover class counts.
Interpret · Application
Left child(2 A,1B), right child(4 A,2B). What is IG?
Show hint
Both children have identical class proportions.
Learning goal: Recognise an uninformative split from equal proportions.
Show solution and calculation
The parent(6 A,3B) and both children havep A=2/3.
All entropies equal H(2/3), and child weights sum to one.
IG=H−(1/3)H−(2/3)H=0.
The branch reveals no label information.
Error analysis · Application
In Example1, the child entropies are averaged without weights. What incorrect gain results?
Show hint
The children contain4 and8cases.
Learning goal: Quantitatively correct an unweighted-average error.
Show solution and calculation
The incorrect value is1−(0+0.811278)/2≈0.594361bit.
Correct weights are1/3 and2/3, giving IG≈0.459148bit.
The larger mixed child must contribute more to residual entropy.
Transfer · Challenge
Two splits of the same parent sample give training IG0.46 and0.40bits. Does this prove the first tree will perform better on new data?
Show hint
Separate local training improvement from generalisation.
Learning goal: Distinguish local gain from a generalisation claim.
Show solution and calculation
No.
The first split reduces label entropy more locally in this training sample.
Later tree structure, sampling variation and overfitting remain unresolved.
Evaluation on appropriate unused data or within a correct validation procedure is additionally required.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Sources for this explanation
Quanta · Updated November 9, 2026
- scikit-learn,DecisionTrees,§1.10.7Mathematicalformulation andClassificationcriteria
- GoogleforDevelopers,MLGlossary:DecisionForests,informationgain
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Authored an original DE/EN article with worked calculations, exercises, model limits and native graphics.
Cite this reference page
Quanta. Information gain of a decision-tree split. Updated November 9, 2026. https://quanta-study.de/en/formula-sheet/informationsgewinn-entscheidungsbaum
When citing a specific scientific statement, also cite the specialist source linked to that statement.