learn-ensemble-methods-with-phoebe / Session 6 of 6
Learn Ensemble Methods with Phoebe · Session 6 of 6

Tune, explain, ship

Five sessions built the machinery; tonight it competes. Five configurations fit their whole ensembles live on the leaderboard - a few hundred real trees per click - and the ranking lands exactly where the research said it would: tuning wins, restraint beats enthusiasm, and 540 extra trees buy less than nothing. Then the two questions every shipped model must answer: why did it flag THIS customer (SHAP), and is a foundation model about to make this whole course obsolete (measured, dated, honestly: not yet, and partly).

🔴 Capstone Everyone who climbed sessions 1-5 45 min
0-3 · Welcome 3-18 · Tuning strategy + explanation 18-40 · Build-along: the leaderboard 40-45 · Q&A
Part 0

Where the ladder stands

One tree: 58. The forest: 68. Careless boosting: 68 with a train score screaming 100. Sessions 4 and 5 explained what the industrial libraries add. Tonight the tuned booster takes the crown at 73, the anti-lever proves more-trees is not a plan, and the model earns the two credentials it needs to ship: an explanation for every flag, and an honest answer to the newest challenger.

🎫 Clear all three quiz questions for the final stamp Live = presented in the 45 minutes Self-study = the full depth, after class

★ What you walk out with tonight. A tuning strategy you have now verified twice with your own clicks. A working grasp of SHAP strong enough to read a waterfall in a meeting. And the dated, two-sided TabPFN verdict that will make you the calmest person in any "is XGBoost dead" conversation.

LiveThe tuning strategy, assembled from the whole course4 min▶

Everything the course measured compresses into four moves, in order:

  • Start from defaults, shallow and slow. Depth 3, learning rate under 0.1, per the ESL law you verified in session 3. Defaults are better than folklore: the McElfresh finding was that LIGHT tuning of a gradient booster beats agonizing over model families.
  • Let early stopping choose the round count. Hold out a validation slice, stop at the crest. You watched the crest exist - 77 percent near round 48 - before drifting down.
  • Then, and only then, touch the shape knobs - depth, minimum leaf size, subsampling - one at a time, watching the holdout, never the train.
  • Stop when the gain stops. The difference between 73 and the theoretical ceiling on noisy churn data is mostly noise you should refuse to chase.
Part 1 · covers explanation

Why did it flag ME? SHAP, the short honest version

8 min live

The voucher team will not act on a score they cannot interrogate, and the first escalation is always a named customer: why did it flag this one? For tree ensembles that question has an exact answer, computed in polynomial time - which is rarer than it sounds.

ONE FLAGGED CUSTOMER · CONTRIBUTIONS SUM EXACTLY TO THE PREDICTION - THAT IS THE SHAP GUARANTEE base rate 48% start: base rate 73 days since order +24 points of churn risk 2 sessions in 30d +11 4 support tickets +8 6 orders in 90d -7 score: 84% risk Illustrative values in the style of a SHAP waterfall. The guarantee that makes it trustworthy: attributions provably sum to the prediction.
🔍 Click to zoom - a waterfall reads as a sentence: mostly the 73-day silence, plus the empty sessions, despite the healthy order count
LiveWhat SHAP guarantees, and the tree-shaped luck4 min▶

SHAP - Lundberg and Lee, 2017 - assigns each feature a contribution to one specific prediction, borrowed from cooperative game theory, and proves it is the unique attribution satisfying a small set of consistency properties. Not "a" way to split the credit: the only way that keeps the books balanced - contributions sum exactly to the prediction's distance from the base rate.

The catch in general: computing Shapley values exactly is exponential. The tree-shaped luck: for tree ensembles, the 2020 TreeExplainer result gives "the first polynomial time algorithm to compute optimal explanations based on game theory" - exact values, fast, by walking the internal structure of the trees. Your booster gets exact explanations essentially free; a neural network gets approximations.

Two honesty rails for using it. Exact-in-polynomial-time is a TREES-ONLY privilege - KernelSHAP for arbitrary models approximates. And SHAP explains what the MODEL did, not what the world does: "73-day silence contributed +24" is a fact about the booster, a correlation the trees found, never proof that silence causes churn. Causal claims live on an entirely different ladder.

Self-studySettling your session-1 feature guesses3 min▶

Global SHAP - averaging attribution magnitudes across all customers - is the grown-up version of "which features matter". On the course data the ranking lands roughly: days since last order first by a wide margin, sessions and orders next, tickets and discount share behind, average order value nearly nothing.

Compare that to the guesses you wrote in session 1. The typical surprise is AOV: it feels like it should matter - expensive-basket customers feel loyal - and the trees, free to use it, barely touch it. An uninformative feature discovered by the model itself is session 1's first Grinsztajn reason, closing the loop.

Build-along

The leaderboard: every config fits live

★ 22 min · everyone builds

Five configurations from the whole course. Press Run on each: your browser fits the entire ensemble - up to 600 real trees - and posts the measured train and holdout scores. The ranking is allowed to embarrass a config, and it will.

THE EXPECTED FINISH ORDER · IF YOUR RUN DIFFERS, RE-CHECK WHICH ROW YOU PRESSED one deep tree 58.0 · the session-1 baseline bagged forest, 60 trees 68.0 · variance canceled boosting, untuned 68.0 · train 100, gap 32 boosting, tuned 73.0 · the crown, on restraint alone ⚠ 600 trees, careless 70.0 · 540 extra trees, minus 3 Same 100 held-out customers judge every row. The only difference between 68 and 73 is the tuning strategy from Part 0.
🔍 Click to zoom - the expected finish order, so your live run has a reference

Run the single tree first. 75 train, 58 holdout - the session-1 numbers, refitted just now. This is the baseline every ensemble in the course exists to beat.

Run the forest. Sixty bootstrap trees with random feature subsets vote their way to 68. Note the train score: 88.5, not 100 - bagging's honesty. Averaging does not pretend to memorize.

Run untuned boosting and put your finger on the gap. Train 100, holdout 68: all that machinery, tied with the forest, because depth 6 at rate 0.5 spent its rounds memorizing. You watched this happen curve-by-curve in session 3; now it is one row on a board.

Run tuned boosting - the crown. Depth 3, rate 0.1, 200 rounds: 73.0. Nothing exotic. The ESL law plus early-stopping discipline, worth five clean points over the identical algorithm run carelessly. Tuning IS the product.

Run the anti-lever last: 600 careless rounds. Ten times the trees of the tuned config's useful phase - result, 70. Three points BELOW the crown. When someone proposes fixing a model by training longer, this row is your answer, and you measured it yourself.

Score your own session-1 N. Your hand-built "flag over N days" rule scored somewhere near the single tree. The distance from your rule to 73 is what this course added; the distance from 73 to 100 is noise nobody honest will ever close on this data.

The sentence the whole course compresses into. Ensembles win tables not by being clever but by being disciplined: average what disagrees, chain what corrects, shrink every step, stop at the crest, and explain every flag before someone asks.

The shipped config was chosen on holdout, by early stopping, and the train score was never the argumentSession 3's law, session 6's leaderboard.
You can produce the waterfall for any flagged customer within a minuteExact for trees - the polynomial-time guarantee is your privilege, use it.
The claim you make for the model carries its scopeTypical, medium-sized tabular; balanced-sample accuracy; correlation not cause.
A retrain trigger exists in writingData drift, definition change, or the quarterly re-route - not "when someone remembers".
You re-ran the challenger honestly this quarterTabPFN or its successors, on YOUR data, dated - not dismissed, not worshipped.
Part 2 · covers the challenger

TabPFN: the challenger, taken seriously

6 min live

A course that crowned gradient boosting in its title owes you the strongest case against it. As of September 2026 that case is TabPFN, a tabular foundation model - and the honest verdict is genuinely split, along a line worth knowing precisely.

Benchmarks say: ahead Nature 2025: beats all previous methods up to 10,000 samples, by a wide margin 2.8s vs baselines tuned for 4 hours v2.5 claims wins to 50,000 rows - vendor-authored, not yet peer-reviewed Peer-reviewed core, real result Competitions say: absent 2024 winning solutions: 16 LightGBM, 13 CatBoost, 8 XGBoost Tabular foundation models: zero Messy data, real stakes, open field - and the trees still cash the checks The in-the-wild record, dated The costs are structural: hard dataset-size ceiling, and every prediction re-processes the training set Both columns true, both dated September 2026. A course that resolved this for you would be lying - re-run the comparison on your data, quarterly.
🔍 Click to zoom - the split verdict, with dates attached, which is the only honest way to hold it
LiveHow to hold both columns at once4 min▶

The Nature result is real: on datasets up to 10,000 samples, TabPFN "outperforms all previous methods... by a wide margin", delivering in 2.8 seconds what took tuned baselines four hours. On data the size of this course's sample, the challenger is likely ahead - which is exactly why the final scorecard makes re-running it a standing row rather than a heresy.

The structural costs are also real. The envelope is hard - beyond it quality and memory degrade, which is why the vendor's own 2.5 release ships a distillation engine to convert predictions back into compact models. And in-context learning means every prediction re-processes the training data: a fitted booster scores a customer in microseconds forever, and that asymmetry is why production and competitions still belong to the trees.

Real world

The grown-up position in a 2026 architecture review: "GBDT is the shipped default; the foundation model is the quarterly challenger with a dated benchmark on our own data." That sentence contains no tribal loyalty, survives both futures, and costs one afternoon a quarter to maintain.

Homework

After the course

45 min
  1. Reproduce the ladder on real data. Pick one labeled table from your work, hold out 20 percent, and run the five leaderboard configs with a real library - xgboost or lightgbm. Write your five numbers next to the course's.
  2. Let early stopping pick M. Use the library's validation-based stopping and note where it stops versus where you would have.
  3. Produce one SHAP waterfall for the most surprising prediction, and write the one-sentence reading like this session's caption.
  4. Run the challenger honestly: if your table is inside the envelope, run TabPFN on the same split and put its number on your ladder, dated.
  5. Write the ship memo: config, holdout score, explanation route, retrain trigger, challenger date. Five lines. That memo is the difference between a model and a shipped model.
Check yourself

Three questions

Clear all three for the final passport stamp.

1 · Tuned boosting (depth 3, rate 0.1, early-stopped) beat the identical algorithm run carelessly by 73 to 68. What produced the five points?

Same loop, same trees' worth of compute in the useful phase, same data. The difference is the ESL strategy: v small, M chosen by early stopping. The engine is deterministic - re-running it produces the same 73 and 68, which is exactly why the leaderboard can hard-code its expectations.

2 · What makes SHAP explanations for your booster special compared to explanations for an arbitrary model?

The 2020 TreeExplainer result: "the first polynomial time algorithm to compute optimal explanations based on game theory", exploiting tree structure. KernelSHAP for arbitrary models approximates. Exact, fast explanation is a genuine competitive advantage of shipping trees - and it explains the model, never the world: attributions are not causes.

3 · A colleague says "TabPFN beat XGBoost in Nature, the trees era is over." The course-grade response?

Both dismissal and surrender flunk. The peer-reviewed result is real and scoped; the in-the-wild record through 2024 is real and dated; the structural costs (size ceiling, per-prediction re-processing) are real and current. Holding contested evidence as contested, with dates, is the discipline - resolving it prematurely in either direction is the error.

Sources covered

What this session teaches, and where it came from

✓ESL 2e section 10.12.1, appliedThe small-v early-stopping strategy, executed live on the leaderboard rather than recited
✓Lundberg & Lee 2017 + TreeExplainer 2020Unique consistent attributions; exact polynomial-time computation for trees, quoted
✓TabPFN, Nature 2025 + TabPFN-2.5 reportBoth columns of the verdict, with the peer-reviewed vs vendor-authored line drawn explicitly
✓ML Contests 2024 + McElfresh 2023The competition tally and the tuning-beats-choosing finding, both dated
◐Causal interpretation of attributionsNamed as out of scope with one honesty rail - the causal ladder is its own course

Every fact on this page, and its verification tier, is recorded in the course's source map.

Session 6 cheat sheet · pin this

The final ladderTree 58, forest 68, careless boosting 68, tuned 73, 600-trees 70. Measured live, reproducible forever.
Tuning strategyShallow and slow, early-stop for M, then one shape knob at a time on holdout. Tuning IS the product.
The anti-lever verdict540 extra careless trees: minus three points. Training longer is not a fix, and you measured it.
SHAP in one lineThe unique consistent split of a prediction into feature contributions - exact and fast for trees only.
Attribution is not causeThe waterfall explains the model, not the world. Keep the two sentences apart in every meeting.
The challenger protocolShip the booster; benchmark TabPFN quarterly on your own data, dated. No tribal loyalty either way.