Two names we will reuse constantly, anchored to that picture:
The tilde (~) just means "the leaves of", so T~ = "the set of leaves of tree T", and the bars ∣⋯∣ mean "how many are in this set" — the same bars you'd use to count marbles in a bag.
Why this tool — why addition and a multiplier, not something fancier? Because we want a straight-line exchange rate: one extra leaf always costs exactly α more, no matter how many you already have. That linear "one price per leaf" is the simplest fair penalty — the same idea behind regularization, where we add a penalty term to stop a model from getting too complex.
The two extremes (memorize these — they are the whole story):
α
rent per leaf
what wins
result
α=0
free
accuracy only
keep the full tree
α→∞
infinite
simplicity only
collapse to the root
So sliding α from 0 up to ∞ walks us from the giant tree down to a single node — a whole family of trees, one per α.
Move all α-terms to one side, error-terms to the other:
α−α∣Tt~∣≤R(Tt)−R(t)α(1−∣Tt~∣)≤R(Tt)−R(t)
Now divide by (1−∣Tt~∣). Careful: since a real subtree has more than one leaf, ∣Tt~∣>1, so (1−∣Tt~∣) is negative — and dividing an inequality by a negative number flips the ≤ into ≥:
α≥1−∣Tt~∣R(Tt)−R(t)
Multiply top and bottom by −1 (flips both signs, cancels out — inequality unchanged) to make it read cleanly:
Reading every symbol:
Numerator R(t)−R(Tt) = the extra error you pay by collapsing (Step 4 said it's ≥0). Small numerator ⇒ the subtree was barely helping ⇒ cheap to cut.
Denominator ∣Tt~∣−1 = how many leaves you delete (you go from ∣Tt~∣ leaves down to 1). Big denominator ⇒ you free lots of "rent" ⇒ better deal.
The whole fraction = extra error per leaf saved — a fair price per unit, so nodes of different sizes can be compared apples-to-apples.
A single-leaf "subtree" (∣Tt~∣=1): denominator =1−1=0 → division by zero, undefined. But this is fine: a subtree that is already one leaf has nothing below it to cut. We simply never compute αeff for leaves — only for internal nodes, where ∣Tt~∣≥2.
A perfectly pure subtree (R(Tt)=0): then αeff(t)=R(t)/(∣Tt~∣−1). Since R(t)≥0, this is ≥0 — well-defined. It just means "cutting costs you the collapsed leaf's full error."
A split that helped nothing (R(t)=R(Tt)): numerator =0 → αeff=0. This node dies at the very first whiff of penalty (α=0+). Correct — a split with zero accuracy gain but extra leaves is pure waste.
Prune the smallest-αeff node → tree T1; record that α as α1.
Recompute and repeat → T2,T3,… until only the root is left.
Result: a nested chain T0⊃T1⊃⋯⊃{root} with increasingα1<α2<… (⊃ means "contains" — each tree is a pruned-back version of the one before).
Which tree in the chain is best? Not the training-error winner (that's always T0 — see the mistake below). We pick with cross-validation: try each α, measure error on held-out folds, keep the α with the lowest CV error. The CV curve is U-shaped — too little pruning overfits (high variance), too much underfits (high bias).
Figure s09 compresses the whole story: the α-axis at the bottom; above it the shrinking trees (T0→ root) appearing as α climbs past each recorded αeff; and overlaid, the U-shaped CV-error curve whose minimum marks the α we finally choose.
Recall Feynman retelling — the walkthrough in plain words
You grew a huge tree that memorized everything, even the flukes. Every leaf is a room, and every room charges rentα. Your total cost is mistakes you make plus rent on all your rooms. When rent is free (α=0) you keep every room; when rent is sky-high you knock the whole house down to one room.
To decide which branch to knock down first, you look at each branch and ask: "if I collapse this bushy branch into one room, how much extra wrongness do I take on, and how many rooms of rent do I stop paying?" Extra-wrongness ÷ rooms-saved is the branch's price per room — its αeff. The branch with the cheapest price is the weakest link; you cut it first. Cut, recompute, cut again — the prices you pay only go up — until just the root remains.
That gives you a whole ladder of trees, tiny to huge. You don't trust your own homework (training error) to pick one, because homework always says "keep everything." You test each tree on hidden animals (cross-validation). Too big overfits, too small underfits — so the error curve dips in the middle. You pick the dip. Done.