Intermediate Topic 24 of 51 AI & Machine Learning
Gradient Boosting
Sequentially adding models that correct earlier errors.
How it works
Gradient boosting builds an ensemble sequentially, with each new weak learner, usually a small decision tree, trained to correct the errors of the current ensemble by fitting the negative gradient of the loss, the residuals for squared error. A learning rate shrinks each tree's contribution, and trees are added until validation performance stops improving. Implementations such as XGBoost, LightGBM and CatBoost add regularization, histogram-based splits, handling of categorical features and efficient parallel training.
Step-by-step walkthrough
- Start with a simple model, often a shallow tree.
- Compute its errors, the residuals.
- Train the next model to predict those errors.
- Add it to the ensemble with a small weight.
- Repeat hundreds of times, as in XGBoost and LightGBM.
Where it is used
Gradient-boosted trees are among the top performers on structured, tabular data, used in click-through prediction, credit risk, ranking, forecasting and many competition-winning solutions.
Common pitfall
They overfit if too many trees, too much depth or too high a learning rate are used, so use early stopping and tune carefully. Training is sequential and slower than random forests, and predictions are less interpretable. Noisy labels hurt. Control complexity, use subsampling and monitor validation loss.
Where it fits in the course
Gradient Boosting is topic 24 of 51 in AI & Machine Learning, rated Intermediate. It follows Random Forests. The next topic is Feature Engineering.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the AI & Machine Learning quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the AI & Machine Learning quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Gradient Boosting?
Where do people use Gradient Boosting?
What is the most common mistake with Gradient Boosting?
What should I learn before this topic?
How can I practice it?
Is Gradient Boosting hard to learn?
How long does it take to learn Gradient Boosting?
Which topics are related to Gradient Boosting?
What should I study after Gradient Boosting?
Related topics
- Random Forests (AI & Machine Learning)
- Feature Engineering (AI & Machine Learning)
- Support Vector Machines (AI & Machine Learning)
- Dimensionality Reduction (AI & Machine Learning)