// interactive walkthrough

How XGBoost trains a model — one split at a time

Pick a dataset, turn the hyperparameter knobs, and step through training tree-by-tree. Every split shows you which feature/threshold won, why it won (the gain math), and what got rejected. No theory dumps — just the actual computation, on a small enough dataset that you can hold the whole thing in your head.

settings changed — model has been reset to apply.
01

Task & objective

// what we're predicting
task
objective
02

Hyperparameters

// drag to tune · changes reset the model
η schedule
η_k = η₀ (default — fixed)
03

Training controls

// advance one split, one tree, or all at once
ready
data & current prediction
current tree
click ▶ Next tree or ▷ Next split to start.
internal (split) leaf (weight) last action
04

Why this split?

// the gain math for the highlighted node

Build a split to see the gain calculation here.

05

Tree → ensemble update

// Fnew(x) = Fold(x) + η · tree(x)

When you finalize a tree (click ▶ Next tree or finish the last split with ▷ Next split), you'll see exactly how each prediction shifts — sample-by-sample — with η as the shrinkage knob.

training loss
predictions vs actuals
06

Ensemble history

// one row per finished tree

No trees built yet.