What is empirical risk minimisation?

Foundations, Learning setup
Level L1 Beginner. Length One-liner. Nature Th Theoretical.

What's being asked

Whether you can state, in one precise sentence, the idea behind almost every training procedure.

Key idea

We want a model f with low true risk R(f)=E(x,y)∼P[ℓ(f(x),y)], the average loss on new data. Here ℓ is the loss (how bad one prediction is) and P is the unknown distribution the data come from. Since P is unknown, we minimise the training-set average instead: R^(f)=1n∑i=1nℓ(f(xi),yi), over a chosen set of models F.

Steps

  1. Define the true (expected) risk R(f)=E[ℓ(f(x),y)]. This is what we really care about: performance on new data.
  2. Say that we cannot compute it, because the data distribution P is unknown. So we replace the expectation by an average over the n training points and choose f^=arg⁡min⁡f∈FR^(f).
  3. If asked for more, give examples. Least squares is ERM with squared loss, and logistic regression is ERM with log loss. Regularisation adds a penalty, R^(f)+λ Ω(f), so that a low R^ is more likely to mean a low R.

Common mistakes

How long your answer should be

One sentence with the formula; a second sentence if asked for an example.

Last checked on 4 December 2026.

Read this

Previous in Foundations: Why must you never tune hyperparameters on the test set?
Next in Foundations: What is the difference between a parametric and a non-parametric model, with one example of each?