This page assumes you have seen nothing but the word "data". We build every symbol the parent note (2.6.15) throws at you, one brick at a time. We introduce each symbol only in its own numbered section below — so by the time the parent hits its scary formulas, you will already know every letter in them.
The picture: a rectangle of rows. Each row is one example. We call the number of rows n (the count of cards) and the number of input columns p (the number of measurements per card).
Why the topic needs it: everything — splitting, training, scoring — is an operation on this pile. If you don't picture D as physical cards you can move into separate piles, none of the later steps make sense.
You cannot test a student on the exact questions they practised. So we hide some cards.
Two more symbols fall straight out of the picture:
Why this notation? The parent writes fλ,D−k. Read it now in plain English: "the model, using knob-setting λ, trained on all cards except fold k." Every subscript is earned.
The picture: a box with dials on the outside (λ, set by you) and gears on the inside (weights, learned from D−k).
Why the topic needs it: the whole disaster in the parent note is about choosingλ. You cannot talk about choosing a knob before you have a symbol for the knob. Knob-choosing strategies live in 2.6.12-Hyperparameter-tuning-strategies.
The picture: show the model each card in D, compare its guess to the true back-of-card answer, and average the per-card mistakes.
Why not just "accuracy"? Loss is the general word — it could be mean squared error, mis-classification rate, anything. The topic uses "Loss" so the same formulas cover regression and classification without rewriting them.
Now we can read the parent's first formula. It only needs one new symbol.
CV(λ)=K1k=1∑KLoss(fλ,D−k,Dk)
Read the whole line aloud now, symbol by symbol: "The cross-validation score CV(λ) of knob-setting λ is the average, over every fold k, of how wrong the model — trained on all-but-k, tested on fold k — turns out to be." Nothing here is mysterious anymore.
Why average? One fold could be lucky or unlucky. Averaging over K folds smooths out that luck, giving a steadier estimate. This is the 2.7.3-Bias-variance-tradeoff tension in miniature: more folds = steadier average but more work.
You compute CV(λ) for several candidate settings and want the winner.
λ∗=argλminCV(λ)
The picture: a bar chart, one bar per candidate λ (so m bars), heights = CV scores. min points at the height of the shortest bar; argmin points at the label under it. The little star λ∗ just means "the chosen, best one".
The parent writes E[Loss(fλ∗,Dnew)]. One last symbol.
Why the topic needs it: "generalization" means how you do on new data on average — exactly E[Loss on Dnew]. The complaint "CV(λ∗) is a biased estimate of E[…]" now reads plainly: your reported number does not match the true long-run average — it sits below it.
Everything above was one loop over folds. Nested CV wraps a second loop around it.
Now the formal symbols for those two loops:
With these, the parent's nested formula reads plainly: run the inner search on Dtrain(i) to get λ∗(i), score it on the untouched Dtest(i), then average those scores over all Kouter rounds.
The diagram below feeds top to bottom: raw ideas at the top, the topic's punchline (nested CV) at the bottom. In words, the chain is: D (a pile of cards) → split into folds → "train on D−k, test on Dk"; separately, a model f with knobs λ produces a Loss; folds + Loss combine into the CV score; taking argmin picks λ∗ but sneaks in negative bias; comparing that against the true E over new data exposes the bias; and the cure is nested CV's two loops (outer judges, inner chooses).