What Every Leaf Has to Earn

Decision Trees & Ensemble LearningHard+30 XP+30

What Every Leaf Has to Earn

A loan-approval tree was grown on 136 past applicants and left completely unpruned. The table shows every node: how many training applicants reached it, and how they split between Approve and Reject.

NodeAsksApplicantsApproveRejectBranches
A (root)Income above $50k?1368749no → B, yes → C
BCredit score above 650?764531yes → B1, no → D
B1leaf36306
DEmployed over 2 years?401525yes → D1, no → D2
D1leaf17107
D2leaf23518
CExisting debt above $10k?604218no → E, yes → C2
ELoan term over 5 years?44359no → E1, yes → E2
E1leaf35314
E2leaf945
C2leaf1679

Every leaf predicts its majority class, so the applicants in its minority are its errors.

Cost-complexity pruning scores a tree TTT by

costα(T)=errors(T)+α×leaves(T)\text{cost}_\alpha(T) = \text{errors}(T) + \alpha \times \text{leaves}(T)costα​(T)=errors(T)+α×leaves(T)

where α≥0\alpha \ge 0α≥0 is a price charged for every leaf. Collapsing a question node ttt replaces its whole branch with one leaf that predicts ttt's majority class. That trade starts to pay once α\alphaα reaches

g(t)=(errors if t were a leaf)−(errors in t’s current leaves)(number of t’s current leaves)−1g(t) = \frac{(\text{errors if } t \text{ were a leaf}) - (\text{errors in } t\text{'s current leaves})}{(\text{number of } t\text{'s current leaves}) - 1}g(t)=(number of t’s current leaves)−1(errors if t were a leaf)−(errors in t’s current leaves)​

Weakest-link pruning raises α\alphaα from 000. It computes ggg for every question node in the current tree, collapses the node with the smallest ggg (that ggg is the value of α\alphaα at which the collapse happens), then repeats the whole process on the smaller tree.

At what value of α\alphaα does the second collapse happen? Give your answer to 2 decimal places.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.