Model tabular data with gradient-boosted trees

8 steps · about 2 h 35 min · Intermediate

  1. 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.

  2. Train a first boosted regressor (tutorial, scikit-learn, 20 min)

    A small worked example shows training and test error moving as trees are added.

  3. 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.

  4. Handle categorical columns natively (tutorial, scikit-learn, 20 min)

    Compare dropping, ordinal encoding, one-hot encoding and native categorical support on the same data.

  5. 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.

  6. Tune for overfitting and imbalance (guide, XGBoost, 15 min)

    Focus tuning on the few parameters that control complexity and randomness rather than searching everything.

  7. 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.

  8. 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.