KatInterview

Fixing an Underfit Boosted-Tree Model: Which Knob to Loosen?

Machine LearningModel answer
MediumModel answerMachine Learninggradient-boostingunderfittinghyperparameter-tuning

Last updated

Pick the one hyperparameter that, when lowered, makes a gradient-boosted tree ensemble more flexible, justify it, and describe how to confirm underfitting.

You have trained a gradient-boosted decision tree model and it is clearly underfitting: it performs poorly even on the data it was trained on.

You want to make the model more flexible by decreasing one hyperparameter. Consider these four candidates:

  1. Maximum tree depth
  2. Maximum number of leaves per tree
  3. The fraction of rows (observations) sampled to build each tree
  4. The minimum number of observations required in a leaf

Tasks

  • Choose which one you would decrease to increase model capacity.
  • Explain the mechanism: why does lowering it let the model fit the data more closely, and why do the other options not do the same (or do the opposite)?
  • Describe how you would confirm that underfitting is really the problem, and how you would check that your change helped without simply trading it for overfitting.

Hints

Hint 1

For each candidate, ask: if I make this value smaller, does the tree become allowed to do more, or less? Only one of the four loosens a restriction when lowered.

Hint 2

Think about what a leaf-size floor forbids: splits that would isolate small groups of rows. What happens to the shape of the fitted function when such splits are forbidden?

Hint 3

To diagnose underfitting, compare training and validation error (learning curves). High error on both, with a small gap, points to high bias rather than high variance.