Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

Bag or boost?

Five tree ensembles side by side, the pairs people confuse, and one run in which bagging cures variance and boosting cures bias.

prints on 2 A4 pagesfrom 5 pages and 1 cataloguefree to read · PDF with a free accountUpdated 23 Oct 2026

Download PDF

The PDF and the Print button ask you to sign in; a free account is enough. Reading and Test yourself are open to everyone.

Side by side

The first columns are the Tree ensembles catalogue’s; the rest come from each page.

Say what each one answers, what it cannot see and when to reach for it, then reveal its row.

Ensemble Wants members that Built More members Tuning burden Reach for it when Trap
Bagging overfit individually in parallel never hurts almost none the model overfits on its own and many fits are affordable Bagging a stable model and expecting a gain.
Random forest overfit individually in parallel never hurts low a strong baseline is needed, which is nearly always Leaving max_features at "all".
AdaBoost underfit individually in sequence can overfit moderate the base model underfits and the labels are clean Outliers and label noise.
Gradient boosting underfit individually in sequence can overfit high tabular accuracy is the goal and there is time to tune Setting the number of rounds without early stopping.
HistGradientBoosting underfit individually in sequence can overfit high the same, on tens of thousands of rows or more Assuming the fast implementations are drop-in equivalent.

A formula is printed only when it is shorter than the words; the others are said in words, and each page has its formula.

Easy to confuse

The “what is the difference between…” questions, in two lines each.

  • Bagging vs Boosting

    Bagging averages members that overfit, all at once; boosting adds members that underfit, one after another.

    Bag a model whose problem is variance; boost one whose problem is bias.

  • Bagging vs Random forest

    A forest is bagged trees that may each split on only a random subset of the features, so they disagree more.

    The forest is the usual default; plain bagging can do better when few features carry the signal.

  • Random forest vs Gradient boosting

    A forest is hard to get badly wrong and needs little tuning; boosting is usually more accurate on tables.

    Start with a forest to see whether there is signal; tune boosting when the last points matter.

  • Learning rate vs Rounds

    Each round adds a step of the learning rate's size, so a smaller rate needs more rounds for the same fit.

    Fix a small rate and let early stopping choose the number of rounds.

One real run

Six models, each fitted on 100 samples of the same problem, so that their error splits into bias² and variance.

Model Bias² Variance Test MSE
stump 16.67 3.01 20.68
deep-tree 3.65 9.14 13.79
bagged-trees 4.31 1.38 6.69
random-forest 5.81 0.86 7.67
boosted-stumps 2.23 1.01 4.24
boosted-trees 1.72 1.52 4.25

“Bagging cuts variance and leaves bias alone.”

“Boosting cuts bias.”

“Decorrelating the trees costs bias here.”

The run and these lines are the worked example on Boosting, as it printed: 100 training sets of 200 rows each, noise variance 1.00

Which one?

  1. Where is the error?

  2. Do you need a baseline quickly?

  3. Does the model have to be read?

Each answer is from its page’s “Why & when”.

All 24 traps on these pages

Each is the opening line of a pitfall; its page says why.

Decision tree

  • An unconstrained tree will overfit, reliably.
  • Small data changes produce different trees.
  • Impurity-based feature importances are biased.
  • Splits are axis-aligned.

Bagging

  • Bagging a stable model and expecting a gain.
  • Treating out-of-bag error as free cross-validation in every case.
  • Reading a bagged model's feature importances as if they were a tree's.
  • Assuming more members can hurt.
  • Bootstrapping dependent rows.

Random forest

  • Leaving max_features at "all".
  • Trusting the built-in feature importances.
  • Tuning the number of trees as if it were a regularisation parameter.
  • Expecting calibrated probabilities.
  • Using it on data with strong extrapolation demands.

Boosting

  • Boosting deep trees.
  • Assuming more rounds is safe.
  • Outliers and label noise.
  • Comparing AdaBoost's α to a probability.
  • Treating boosting and bagging as interchangeable "ensembles".

Gradient boosting

  • Setting the number of rounds without early stopping.
  • Tuning η and M independently.
  • Deep trees.
  • Assuming the fast implementations are drop-in equivalent.
  • Reading feature importances off a boosted model as truth.

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com