Model tabular data with gradient-boosted trees
8 steps · about 2 h 35 min · Intermediate
- See how boosting corrects errors step by step (guide, Google for Developers, 20 min)
Each new tree fits what the previous ones got wrong; that idea explains every parameter you tune later.
- Train a first boosted regressor (tutorial, scikit-learn, 20 min)
A small worked example shows training and test error moving as trees are added.
- Stop adding trees when validation stops improving (tutorial, scikit-learn, 20 min)
Early stopping saves time and protects against overfitting without guessing the number of trees.
- Handle categorical columns natively (tutorial, scikit-learn, 20 min)
Compare dropping, ordinal encoding, one-hot encoding and native categorical support on the same data.
- Read the objective behind boosted trees (doc, XGBoost, 30 min)
The regularised objective explains why learning rate, depth and minimum child weight behave as they do.
- Tune for overfitting and imbalance (guide, XGBoost, 15 min)
Focus tuning on the few parameters that control complexity and randomness rather than searching everything.
- Tune leaf-wise trees for speed or accuracy (guide, LightGBM, 15 min)
Leaf-wise growth needs different limits from depth-wise trees; learn which settings to change for each goal.
- Enforce known directions with monotonic constraints (tutorial, scikit-learn, 15 min)
When a feature should only ever push predictions one way, a constraint makes the model safer to explain.