2.6.12 · D1Model Evaluation & Selection

Foundations — Learning curves analysis

3,087 words14 min readBack to topic

Before you can read a learning curve, you must be able to read every mark on it. This page builds the whole alphabet from nothing. Nothing here assumes you have seen a formula before. We collect the pieces in order — each one leans on the one before it.


1. What is a "model"? (the guessing machine)

Figure — Learning curves analysis

In the figure, follow the flow left to right: the input enters as the labelled arrow on the left (a house size). The black box is the rule . The red dial inside the box is — turning that one red dial changes the guess that leaves on the right arrow. So the picture is literally the symbols: arrow-in , box , red dial , arrow-out . Learning means finding the red-dial position that makes the output arrow least wrong.

Why does the topic need this? Because a learning curve is a story about one model being retrained on more and more data. If you don't picture as an adjustable machine, the rest is meaningless.

See Model Complexity for what makes a model "simple" or "complicated" — that idea returns in Section 6.


2. The true answer, the guess, and the gap between them

The gap between and for a single example is what we are about to measure. A perfect guess has zero gap; a bad guess has a big gap.


3. Loss — measuring one mistake

Figure — Learning curves analysis

In the figure, the black line is the model ( for every ). Each black dot is one true answer . The red vertical stick from a dot up to the line is that example's error — its length is exactly what squares.

Why this tool and not just "count the wrong ones"? For predicting a number (like price), there is no simple right/wrong — you are always a little off. Loss measures how much off, on a smooth scale, so the model can tell whether a knob-turn helped a little or a lot.


4. Averaging the mistakes: the cost and the sum

We have a loss for each example. To score the model overall, we average all of them. That average is the cost .

Why divide by ? So the number stays comparable no matter how many examples you have. A total of 200 across 100 houses is not worse than 100 across 40 houses — the average (2 vs 2.5) is the fair comparison. This matters enormously here because the whole point of a learning curve is to change and watch .


5. Two datasets: training vs validation

Figure — Learning curves analysis

In the figure, the left black box holds the training dots the model practices on; the right red box holds the validation dots it is quizzed on but never studies. The two boxes never share a dot — that separation is the whole point. See Train-Test Split and Cross-Validation for how this split is done reliably.

Why two costs and not one? Because the difference between "how well you do on studied material" and "how well you do on the quiz" is the entire diagnosis. A model can ace the practice sheet and flunk the exam — that gap is overfitting.


6. The horizontal axis: as a variable, not a fixed number

The single deepest idea for reading learning curves: we retrain the model at many different training-set sizes and plot the results.

Look back at Sample Size Determination — deciding how big needs to be is exactly the question a learning curve answers visually.


7. What happens as grows forever: the limit

Figure — Learning curves analysis

In the figure, the horizontal axis is and the black curve is a cost ; as you move right (more data) it flattens toward the dashed red line, which marks the limit — the height it never crosses. The whole diagnosis in the parent note ("both errors plateau high" vs "gap persists") is a statement about what these limits are and how far apart they sit.

Why do we need limits? Because a learning curve is only a few dots, but the question — "would even more data help?" — is about behaviour far to the right, past the data you have. The limit is the mathematical way to reason about "off the edge of the chart."


8. The named error pieces: bias, variance, noise

The parent note splits total error into named ingredients. Here is what each is, in plain words.

Now the parent note's two key approximations, with the why spelled out and the noise handled correctly:

Both extra terms shrink via the same "divide by " move you met in Section 4 — bigger makes them small. What they cannot remove is (fixed by model choice) or (fixed by the data's own noise).

Tools that change these ingredients: Regularization and Feature Engineering lower variance or bias; more data mainly attacks the gap term.


Prerequisite map

Model h with knobs theta

Loss L on one example

True y vs guess y-hat

Cost J as average over a set

Summation sum

Train set vs Validation set

Cost depends on m

Limit as m grows

Plateau height

Bias Variance Noise pieces

Learning Curves Analysis

Read it bottom-right: every arrow is a "you need this first." The alphabet of Sections 1–8 all pours into the single topic node.


Equipment checklist

Cover the right side and see if you can answer each before revealing.

What does mean in plain words?
A guessing machine that turns input into a prediction, using adjustable knobs .
What is ?
The set of internal numbers (knobs) the model tunes to make better guesses.
Does the superscript in mean a power?
No — it labels example number . A power would have no brackets.
What is the explicit squared loss ?
— the gap between guess and truth, squared.
What does tell you to do?
Add the following quantity once for each example, from up to .
What is a cost , and what does its subscript tell you?
The average loss over a set of examples; the subscript says which set (train or validation).
Why does divide by ?
To get the average loss per example, so the score is comparable across different dataset sizes.
What values can take, and why never ?
, — you need at least one example to average, so is always defined.
Difference between and ?
= number of examples the model studies (training); = number in the held-out quiz set (validation).
Why can we write when we defined ?
The quiz set stays a fixed size; on a learning curve we vary the training size and re-measure, so we relabel the argument to .
What does the bare umbrella symbol stand for?
Either or — whichever curve a statement applies to; not a separate cost.
What does ask?
The value the cost settles to as training data grows without bound — the plateau height.
Define .
— the vertical distance between the two curves.
What do , , and stand for?
= irreducible noise floor; = grows with model complexity; = a fixed positive constant sizing the small-sample slack.
What is the true floor of the training curve as ?
— model-simplicity error plus irreducible noise, both unremovable by more data.
Bias vs variance in one line each?
Bias = error from being too simple (wrong every time); variance = error from being too twitchy (wrong depending on which data it saw).