What is the difference between a model's training error and its true (population) error, and what does a generalisation guarantee promise about the gap between them?

Learning theory, Generalisation
Level L1 Beginner. Length Short. Nature Th+Mat Both.

What's being asked

Whether you see that the error we can measure (on our sample) is only an estimate of the error we care about (on future data), and that learning theory is about bounding the distance between the two.

Key idea

Think of a student who practises 30 past-paper questions. The score on those 30 is the training error L^(h). The score on every question the examiner could ever set is the true error L(h). A generalisation guarantee says: with high probability, L(h)≤L^(h)+gap, and the gap shrinks as the sample gets bigger and grows if the class of models is richer.

Steps

  1. Define the two errors in plain words. Training error is the fraction of mistakes on the m examples we trained on. True error is the fraction of mistakes on fresh examples drawn from the same source, which we can never list in full.
  2. Explain why the first is only an estimate of the second. A model can look perfect on its training sample by luck or by memorising, just as a student can know exactly those 30 questions and nothing else.
  3. Define the generalisation gap as L(h)−L^(h). Tiny example: a classifier makes 2% mistakes on its training data but 9% on a large fresh test set, so the gap is 9%−2%=7 percentage points.
  4. State what a guarantee promises: it does not say the gap is zero. It says that, with high probability over the random draw of the sample, the gap is at most some number that you can write down in advance.
  5. Say what makes that number smaller or bigger. More training examples shrink it (more questions practised, a fairer picture). A richer set of possible models enlarges it (more ways to match the sample by luck). Later chapters make this precise with Hoeffding, VC dimension and uniform convergence.

Common mistakes

How long your answer should be

About 2 minutes: two definitions, one picture (the student and the past papers) and the 7-point example.

Read this

Previous in Learning theory: none
Next in Learning theory: What does the no free lunch theorem say, and why does it not mean that learning is impossible?