Machine Learning · Splitting Criterion

Entropy & Gain

Impurity peaks at a 50/50 mix — a tree splits on whatever question removes the most of it.

split on
share p
0.50
entropy H(p)
1.000
gini(p)
0.500
reading
max
entropy (bits)gini
drag p: both peak at 50/50, both hit 0 when the leaf is pure
Information Gain · Play Tennis (14 days)
S H(S)=0.94 split on Outlook
before · H(S)
0.940
after · weighted
0.694
information gain
0.247
tree picks
best split ✨
gain per attribute
id3.py