Gradient LabStart the lesson

Lessons › Chapter 6: Trees and ensembles

Boosting

Boosting starts with a very simple model, a weak learner: here, a single cut. It gets most points right, but a couple are on the wrong side.

Watch it move. This lesson is interactive on Gradient Lab: every step is an animated scene you can replay.

Start the interactive lesson

Step by step

Story

Learning from misses

Some fraud keeps slipping through. Leo wants each new model to focus on what the last one missed.

Concept

Start with a weak learner

Boosting starts with a very simple model, a weak learner: here, a single cut. It gets most points right, but a couple are on the wrong side.

Key idea

Make the mistakes louder

Find the examples model 1 got wrong and give them more weight, shown here as bigger balls. The next model will be pushed to care about them.

Build

The next model fixes them

Model 2 is trained with those weights, so it makes a different cut that handles the heavy points. Round after round, each new model patches what the team still gets wrong.

Insight

A strong team from weak players

Combine all the small models in a weighted vote and you get a strong classifier. This is boosting: many weak learners, trained in sequence, that add up to something powerful.

Real life

In real life: finding faces in a camera

The face boxes in early digital cameras came from a famous boosting method: a long chain of tiny, quick checks (“is this patch darker above than below?”). Each check is weak, but together they find faces in real time.

Quick check: In boosting, what does each new model focus on?

Mistakes get extra weight, so the next model concentrates on them.

Pseudocode

weights = equal for every example
repeat for several rounds:
    model = train_small_model(data, weights)
    mistakes = examples this model got wrong
    increase the weight of the mistakes

final answer = weighted vote of all the small models

Key terms

weak learner
A simple model that is only a little better than guessing.
boosting
Training small models one after another, each fixing the mistakes of the ones before.