CS 460G Midterm Hub / Lectures / Week 2 Lecture 2
Week 2 · Lecture 2

Learning Theory II — Generalisation, PAC, Learning Types

Train/test split as the measurement of generalisation, PAC bounds, and the taxonomy of learning.

short answerconceptual

The bridge from "minimise training error" to "perform on data you have never seen".

Generalisation

> Generalisation is performance on new data drawn from the situation we care about.

Generalisation defined
Generalisation defined · slide 12
  • Good generalisation — learns useful patterns, works on new data.
  • Poor generalisation — memorises training examples, struggles on new data.

The operational definition is a partition: the training set is used to fit and select the hypothesis; the test set measures generalisation. This is the seed of the whole W5L3 validation deck.

PAC learning

PAC (Probably Approximately Correct). ERM with respect to a finite hypothesis class, applied to a sufficiently large training sample, outputs a hypothesis that is probably approximately correct.

ε bounds the error, δ bounds the probability of failing to meet it
ε bounds the error, δ bounds the probability of failing to meet it · slide 16

Two parameters do two different jobs — this distinction is the mark:

  • $\epsilon$ — how far the output classifier can be from the optimal one. That is the approximately correct part.
  • $\delta$ — how likely the classifier is to meet that accuracy requirement. That is the probably part.

Sample complexity $m_{\mathcal{H}} : (0,1)^2 \to \mathbb{N}$ answers "how many examples are required to guarantee a PAC solution?" Every finite hypothesis class is PAC learnable, and the bound has the shape

$$m_{\mathcal{H}}(\epsilon,\delta) \;\ge\; \frac{\log|\mathcal{H}| + \log(1/\delta)}{\epsilon}$$

so sample size grows logarithmically in the size of the hypothesis class and quadratically in $1/\epsilon$. That log-in-$|\mathcal{H}|$ is the single most quotable consequence: a bigger hypothesis class is affordable, but only logarithmically.

Sample complexity of a finite hypothesis class
Sample complexity of a finite hypothesis class · slide 18

The three learning settings

SettingDataGoalCourse examples
Supervised$D=\{(x_i,y_i)\}$ — labels presentpredict $y$ for a new $x$classification, regression
Unsupervised$D=\{(x_i,?)\}$ — no labelsdiscover structureclustering, dimensionality reduction
Reinforcement$(x_i, \text{output}, \text{grade of output})$maximise reward through actionsagent–environment loop
Supervised learning — every example carries a target
Supervised learning — every example carries a target · slide 21
Unsupervised learning — no labels, learn structure
Unsupervised learning — no labels, learn structure · slide 22
Reinforcement learning — state, action, reward
Reinforcement learning — state, action, reward · slide 25

The reinforcement slide uses tic-tac-toe: current state → action → reward (+/−). The feedback loop between the learning system and its experience is what distinguishes it from the other two.

Additional settings named but not developed: semi-supervised, self-supervised, multi-task, active, curriculum learning.

If asked "supervised vs unsupervised with concrete examples": give the definition of the data first (labels present vs absent), then one example each from the course — logistic regression on the diabetes table (supervised, because the Diabetic column exists) versus k-means on the same table with the label column deleted (unsupervised). Using one dataset twice makes the contrast sharper than two unrelated examples.