# Gradient boosting

> Canonical: https://skillalmanac.com/glossary/gradient-boosting | Last verified: 2026-11-25 | Index status: index-eligible

Gradient boosting is an ensemble method that builds many small models, usually decision trees, one after another, with each new model fitted to reduce the errors left by the models before it.

Also called: gradient boosting machine, GBM.

## In plain language

Gradient boosting combines many weak guessers into one stronger one. The first small model makes a rough prediction. The next is trained on what the first got wrong, the one after that on what is still wrong, and so on. The combined predictor can be useful for tables such as customer records, but suitability depends on the data, objective and comparison with a baseline on held-out examples. The trade-offs are that it has several settings to tune and that, pushed too far, it can fit the training data too closely and do worse on new data.

## Technical definition

Gradient-boosted regression trees form a greedy additive model, F_m(x) = F_(m-1)(x) + h_m(x). At each iteration, scikit-learn fits the new regression tree h_m to predict the samples' negative loss gradients; for some losses it then adjusts the leaf values to minimise the loss. This is a form of gradient descent in function space, not ordinary parameter descent on one fixed tree. Shrinkage changes the update to F_m(x) = F_(m-1)(x) + νh_m(x), where ν is the learning rate; smaller learning rates require more weak learners to maintain the same training error. Gradient-boosted trees support differentiable losses for regression and classification. XGBoost likewise sums trees and optimises an objective containing training loss and tree-complexity regularization. scikit-learn provides GradientBoosting and HistGradientBoosting estimators.

## How it shows up when you use agents

Gradient boosting is a [supervised learning](/glossary/supervised-learning) method. Gradient-boosted tree implementations are available in scikit-learn and XGBoost for regression and classification. If an agent proposes such a model, ask which objective, features and validation protocol it uses. In the tree-based version, successive trees are fitted toward reducing the chosen loss; [gradient descent](/glossary/gradient-descent) on a neural network instead updates that network's parameters.

The examples illustrate data and evaluation checks around model training. What breaks when it is misunderstood is trust in the score. IBM describes [overfitting](/glossary/overfitting) as a model becoming too specialised to the training data, so a high training score does not establish held-out performance. Ask the agent for a score on held-out rows, check for leakage between splits, and ask which learning rate and number of trees were used. A next action is to compare it with a simpler baseline on the same split.

## Common confusions

- **Gradient boosting versus XGBoost.** Gradient boosting is a broader learning method. Gradient-boosted trees are one form; XGBoost and scikit-learn provide implementations of that form.
- **Boosting versus random forest.** A [random forest](/glossary/random-forest) aggregates randomized trees. Gradient boosting instead builds an additive model sequentially, fitting each new learner to improve the current ensemble objective. Separately constructed trees need not have statistically independent predictions.
- **Gradient boosting versus gradient descent.** Gradient descent adjusts the parameters of one model. In boosting, each new tree is fitted to the negative gradients, which scikit-learn describes as gradient descent in a functional space.
- **Weak learner versus bad model.** In boosting, a weak learner is a small model, such as a shallow tree. Its job is to add a small correction.

## Worked examples in this catalogue

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A JSON report that checks train, validation and test files for duplicates, shared groups, time leakage and label leakage.

Why it exercises the concept: Adjacent evaluation check: this skill examines separation between existing training and test rows. It does not train a gradient-boosted model, and a leakage check alone cannot establish every aspect of model quality.

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A fixed exploratory-analysis procedure and a CSV profiler, with findings kept descriptive, evidenced and caveated.

Why it exercises the concept: Profiling a table first shows the column types, gaps and spread that decide whether this method is a sensible choice for the data.

### [mock-record-generator](https://skillalmanac.com/skills/skill-almanac/mock-record-generator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Seeded mock records written as CSV or JSON from a JSON field list or a simple TypeScript interface.

Why it exercises the concept: Seeded mock rows give you a small, repeatable table to try a scikit-learn example on without touching real data.

## Related terms

- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Decision tree](https://skillalmanac.com/glossary/decision-tree.md)
- [Random forest](https://skillalmanac.com/glossary/random-forest.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)
- [Gradient descent](https://skillalmanac.com/glossary/gradient-descent.md)
- [XGBoost](https://skillalmanac.com/glossary/xgboost.md)

## Sources

- [1.11. Ensembles: Gradient boosting, random forests, bagging, voting, stacking](https://scikit-learn.org/stable/modules/ensemble.html), scikit-learn (accessed 2026-11-25)
- [What is gradient boosting?](https://www.ibm.com/think/topics/gradient-boosting), IBM (accessed 2026-11-25)
- [Introduction to Boosted Trees](https://xgboost.readthedocs.io/en/stable/tutorials/model.html), XGBoost documentation (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
