ML Foundations
Back to Supervised Learning

Gradient Boosting — XGBoost, LightGBM, CatBoost

The current dominant family for tabular ML. The intuition behind GBM and why the three libraries exist. FIND_VIDEO: search 'gradient boosting xgboost lightgbm explained' — recommended channel: StatQuest / 3Blue1Brown. Aim for 12 min or under.

16 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Context and Prerequisites — Gradient Boosting is positioned as an advanced regression technique requiring knowledge of Decision Trees and Adaboost.
  2. Adaboost vs. GBR Mechanics — The core differences in initialization and tree structure between Adaboost and Gradient Boosting are illustrated.
  3. Initial Prediction and Residuals — The process begins by calculating the average target value and deriving the first set of pseudo-residuals.
  4. Building the First Error Tree — A constrained decision tree is built to predict the residuals, demonstrating how immediate overfitting occurs without shrinkage.
  5. Introducing Learning Rate — The learning rate is applied to scale down the tree's contribution, mitigating overfitting and improving generalization.
  6. Iteration and Cumulative Update — The iterative cycle is completed by calculating new residuals and updating the final cumulative prediction with the scaled second tree.
PDF notes

Frequently asked questions

Why are they called 'pseudo-residuals'?

They are mathematically the negative gradient of the loss function with respect to the current prediction, which happens to equal the simple residual ($Y - \\hat{Y}$) when using Mean Squared Error loss.

What happens if the learning rate is set to 1.0?

The model will likely overfit immediately because each new tree's full contribution is added, causing the cumulative prediction to jump too aggressively toward the training targets.

How do tree constraints help prevent overfitting?

By limiting the size of the tree, you ensure that the individual learner is weak and cannot perfectly memorize the residuals, forcing the model to rely on the ensemble effect over many iterations.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.