/knowledge/notes/risk-and-pac-learning
Concept note · ML
Risk and PAC Learning
Learning Theory
- Studied
- Statistical Machine LearningCOMP90051
- When
- 2023 S1
- Applied in
- Studied
- Read / Refreshed
- ~5 min read2026-10-15
A learner minimises empirical risk (average loss on training data) as a proxy for expected risk (average loss on all possible data). The gap between them is generalisation error. PAC learning formalises when this gap is small with high probability.
01
The idea
Expected risk R(h) = E[L(h(x), y)] measures how well hypothesis h performs on the data distribution. We cannot compute it directly, so we minimise empirical risk R̂(h) = (1/n) Σ L(h(xᵢ), yᵢ) on the sample. The difference R(h) - R̂(h) has two parts: estimation error (finite sample) and approximation error (hypothesis class).
PAC (Probably Approximately Correct) says a learner succeeds if, with probability ≥ 1 - δ, it finds a hypothesis with R(h) ≤ ε. Bounds depend on the hypothesis class complexity (VC dimension) and sample size n. More complex classes need more data to generalise.
02
The maths
03
Try it
04
Where I used it
05
Easy to get wrong
06
Sources
COMP90051 Statistical Machine Learning (2023). PAC bounds and VC dimension.