intermediateTrees & Ensembles

The Forest Scores 100% on Training

Decide what you would do from the brief alone, including whether you would change anything at all. Everything below it is available, but the exercise stops working if you open it first.

The brief you were given

From the intern channel: "Random forest gets 100% training accuracy and 84% validation. Boosting gets 91% training and 86% validation. Is the forest broken? Should I use fewer trees?"

The trap — the fix that moves the metric and is not the fix

Cutting the forest to 20 trees and a max depth of 5 so training accuracy "looks reasonable" at 88%, then reporting the forest as fixed. Training accuracy falls, which satisfies the intuition that 100% was broken, and validation falls with it — the shallow forest has high bias and the variance reduction from 20 trees is weak. The chart now shows both models with similar training and validation numbers, which looks like a fair comparison, and it was produced by crippling one of them to satisfy a rule about a metric that never applied to it.

Read this even if you are confident. It is here rather than behind a button because it is the answer most teams actually ship, it passes review, and its cost arrives weeks later when the labels do.