How this course works
Six sessions, 45 minutes each, one running project: predict which Mango Lane customers churn. Mango Lane is a fashion app - AOV $68, about $660,960 of monthly GMV, 12,000 customers - and marketing wants to know who is about to leave. Every lab runs on the same deterministic 300-customer sample: 200 to learn from, 100 held out and never touched during training. By session 6 you have climbed from one overfit tree at 58 percent holdout to a tuned booster at 73, and every number on that ladder is measured live in your browser, not quoted from a slide.
★ What you walk out with tonight. The three research-grade reasons trees beat neural networks on tables, with their exact scope so you never overstate them. The honest 2024 competition tally. And your first hand-built split on the real course data, which is worth more than both.
LiveThe claim this course rests on, stated carefully3 min▶
The claim is not "trees always win". The claim, from the paper that tested it properly: "tree-based models remain state-of-the-art on medium-sized data (~10K samples) even without accounting for their superior speed." That is Grinsztajn, Oyallon and Varoquaux, NeurIPS 2022, across 45 datasets - and the word doing quiet work is medium-sized. Most tables you will ever model - churn lists, credit files, ops logs - live exactly in that range.
Careful scope is not hedging, it is the skill. A claim you can state with its boundary attached survives every meeting; the boosterish version dies at the first counterexample.
Mango Lane's last churn attempt was a neural network a contractor built in 2024. It needed an embedding layer for six numeric columns, took a week to stop diverging, and lost to the analyst's logistic regression. Nobody had read the tabular literature; everyone had read the deep learning press.
Self-studyThe vocabulary for the whole arc3 min▶
- Ensemble - many weak-ish models combined into one strong one. The two great recipes: average independent models (bagging, session 2) or chain corrective models (boosting, session 3).
- Variance - how much your model changes if the training sample changes. Deep single trees are high-variance: perturb the data, get a different tree. Averaging attacks variance.
- Bias - error from the model being too simple to express the truth. Boosting attacks bias, one small correction at a time.
- Holdout - the 100 customers the model never sees while learning. Every honest number in this course is a holdout number; every seductive number is a train number.
Three reasons, quoted at the source
7 min liveThe Grinsztajn paper did not just measure that trees win on typical tables - it isolated why, by degrading tabular data until neural networks caught up. The paper frames the findings as three challenges a neural network must solve to compete. Read as a mirror, they are the three reasons trees are at home in a table.
LiveReason by reason, on Mango Lane's actual columns5 min▶
The course dataset has six features: days since last order, orders in 90 days, average order value, support tickets, discount share, sessions in 30 days. Watch the three reasons land on it:
- Uninformative features. Average order value turns out to carry almost no churn signal here. A tree simply never splits on it. A neural network spends capacity learning to ignore it, and on 200 training rows there is no capacity to spare.
- Orientation. "Days since last order over 45" is a meaningful statement about a real column. A rotated mixture of days-and-ticket-counts is meaningless - and tabular data is full of such axis-aligned meaning. Trees cut along axes by construction; the paper shows rotating the data destroys the tree advantage, which proves the advantage was the orientation.
- Irregular functions. Churn risk does not glide upward with inactivity - it steps: fine at 30 days, gone at 50. A tree IS a step function. A smooth network has to contort to make a cliff.
The second paper that keeps you honest. McElfresh and colleagues re-ran the question at 176 datasets and 19 algorithms in 2023 and found something less romantic: on a surprisingly high number of datasets the tree-vs-net difference is negligible, and light hyperparameter tuning on a gradient-boosted tree matters more than which model family you chose. Session 6 turns that finding into your working habit.
Self-studyWhere the story is honestly shifting4 min▶
A course built on evidence has to show you the newest evidence even when it complicates the title. Two dated facts, both real:
- Benchmarks, 2025: TabPFN, a tabular foundation model published in Nature, "outperforms all previous methods on datasets with up to 10,000 samples by a wide margin" - in 2.8 seconds, against baselines tuned for four hours. Its successor claims wins up to 50,000 rows, though those numbers are vendor-authored and not yet peer-reviewed.
- Competitions, through 2024: among the year's winning solutions, 16 used LightGBM, 13 CatBoost, 8 XGBoost - and not one tabular foundation model appears. In the wild, where data is messy and stakes are real, the trees still cash the checks.
Both facts, both dated, no side picked before the evidence settles. Session 6 puts TabPFN on the same leaderboard as everything else and lets the measured numbers argue.
One tree memorizes; a crowd of trees learns
6 min liveIf trees are so at home in tables, why is the course called ensemble methods and not decision trees? Because a single tree has a fatal flaw, and the whole field exists to fix it.
LiveInstability is the disease, and also the cure4 min▶
Leo Breiman named the mechanism in 1996, and his sentence is still the cleanest statement in the field: "The vital element is the instability of the prediction method. If perturbing the learning set can cause significant changes in the predictor constructed, then bagging can improve accuracy."
Deep trees are spectacularly unstable - move ten customers and the whole upper tree can reshape. That is exactly why averaging many of them works: each tree's private, sample-specific mistakes point in different directions, and directions that disagree cancel. Instability, which made one tree untrustworthy, is the raw material that makes a forest strong.
This is also why bagging a bunch of logistic regressions barely helps: they are stable, so every copy makes the SAME mistakes, and averaging identical errors changes nothing. The cure only works on the disease.
Self-studyThe two recipes, side by side, before the deep dives3 min▶
| Question | Bagging (session 2) | Boosting (sessions 3-5) |
|---|---|---|
| Trees are trained | Independently, in parallel | Sequentially, each on the last one's errors |
| Attacks | Variance - averaging cancels noise | Bias - each round adds missing signal |
| Tree size | Deep, unstable on purpose | Shallow, weak on purpose |
| Combined by | Vote or average | Weighted sum, scaled by learning rate |
| Overfits when | Rarely gets worse with more trees | More rounds keep polishing noise - session 3 shows it live |
Every named tool from here - random forest, XGBoost, LightGBM, CatBoost - is one of these two recipes plus engineering. Keep the two-row map and nothing in the field will surprise you.
The Mango Lane brief, and the ladder you will climb
5 min liveMarketing's ask: "12,000 customers - tell us who is about to churn, early enough that a voucher still changes their mind." The course works the deterministic 300-customer lab sample, so every learner's numbers match, and the model mechanics stay visible at human scale.
LiveRead the ladder before you can build it4 min▶
Three things in that chart carry the whole course:
- The forest's plus-ten. Same trees, same data - just sixty of them, each on a bootstrap sample with random feature subsets, voting. Averaging is worth ten points here. That is session 2's entire argument, measured.
- The tie at 68. Careless boosting - deep trees, fast learning rate - reaches training accuracy of 100 percent and STILL only ties the forest on customers it never saw. The 32-point train-holdout gap is the most instructive number in the course.
- The falling bar. Six hundred rounds of the same careless recipe lands at 70 - below the tuned 73. More trees is not a strategy. Session 6 makes you feel that with a button.
Why plain accuracy, for once. The lab sample is deliberately balanced - churn runs 48 percent in training, 47 in holdout - so accuracy reads honestly here. On real skewed churn data it would not; the metric zoo and which mistake costs what is a different course's whole subject, and one pointer beats a bad summary.
Meet the data, split it by hand
★ 18 min · everyone buildsBefore any library touches this data, you will. One hand-built split tonight - because every forest and every booster in this course is made of nothing but thousands of the decision you are about to make once, slowly, yourself.
Write down the six features: daysSinceOrder, orders90d, aov, tickets, discountShare, sessions30d. Beside each, one guess: does more of it mean more churn, less churn, or nothing? Keep the guesses - session 6's SHAP chart grades them.
Take this 10-customer excerpt from the training sample (days since order, churned): (12, no) (67, yes) (31, no) (80, yes) (8, no) (44, yes) (55, yes) (19, no) (72, yes) (38, no). Sort them by days. Notice the yeses cluster high - but not perfectly.
Pick your threshold. Try "churn if days > 40": that calls 5 of 5 high-side customers right and 5 of 5 low-side right on this excerpt - 10 of 10. Now try 25 and 60 and count again. You just did a split search: score every candidate cut, keep the best. A tree does exactly this, feature by feature, node by node.
Now break your own rule. The full 200-customer sample contains a customer at 62 days who did not churn, and one at 22 who did - 10 percent of the labels are noise by construction, because real churn always is. Your clean 10-row rule is already wrong somewhere. THAT is why one tree that keeps splitting until every training customer is right ends up at 58 on the holdout: past some depth, it is fitting the noise you just met.
Write the one-sentence brief for the voucher team. "Flag customers over N days inactive" - your N, from your split. Session 2 replaces your single rule with sixty voting trees; keep tonight's sentence to compare against what the machine finds.
What to bring to session 2. Your feature guesses and your N. The forest will agree with some of your instincts and embarrass others, live, and the embarrassing ones are where the learning is.
Before session 2
30 min- Read the Grinsztajn abstract (arXiv 2207.08815) - just the abstract - and find the two scope words this session kept repeating. Write the claim in one sentence with the scope attached.
- Find one table in your own work where the target jumps rather than glides - a threshold, a cliff, a policy boundary. That is reason 3 living in your data.
- Find one uninformative column in the same table - something you know carries no signal. Reason 1 says the tree will discover that on its own; session 2's forest lets you check.
- Hand-split practice: take 10 real rows from your table, one numeric feature, and search the best threshold by counting, like tonight. Note how fast the search gets tedious - that tedium is what the machine is for.
- Optional: ask a colleague which model family wins on tabular data and listen for evidence versus vibes. You now hold the dated citations either way.
Three questions
Clear all three and session 1 gets stamped in your passport.
1 · The Grinsztajn finding is that tree-based models remain state of the art - under what scope?
The paper's own words: "state-of-the-art on medium-sized data (~10K samples)", on typical tabular benchmarks. The scope is not hedging - it is what keeps the claim true. Most business tables live exactly in that range, which is why the finding matters despite its boundary.
2 · A single depth-6 tree hits 75 percent on training customers but 58 percent on the holdout. What happened?
Both sets come from the same generator and accuracy reads honestly on this balanced sample - the 17-point gap is pure memorization. About 10 percent of labels are noise by construction, and a deep tree faithfully learns it. Instability plus noise is the disease; bagging and boosting are the two cures.
3 · What did McElfresh and colleagues find across 176 datasets that session 6 turns into a working habit?
The 2023 follow-up at 176 datasets and 19 algorithms: for a surprisingly high number of datasets the family difference is negligible, and light hyperparameter tuning on a GBDT is the bigger lever. Spend your hour tuning, not debating architectures - session 6's leaderboard makes it visceral.
What this session teaches, and where it came from
Every fact on this page, and its verification tier, is recorded in the course's source map.
Session 1 cheat sheet · pin this
Tonight you built one split and met the 17-point gap. Session 2 builds sixty trees at once: bootstrap sampling, random feature subsets, out-of-bag error - the Breiman recipe that turns instability into ten extra holdout points, and the free validation trick that removes the need for a set-aside test set.