What does the no-free-lunch theorem say, and what does it imply for choosing a learning algorithm in practice?

Foundations, Generalisation
Level L4 Advanced. Length Medium. Nature Th Theoretical.

What's being asked

Whether you understand why every learner needs built-in assumptions, and can state the theorem without overclaiming.

Key idea

Averaged over all possible target functions, with each one equally likely, every learning algorithm has the same expected error on points it has not seen. A gain on some problems is paid for by a loss on others. Learning works only because real problems are not random.

Steps

  1. State it (Wolpert, 1996). Take any two algorithms A and B, and average over all possible target functions on a finite input space. Their expected error on inputs outside the training set (the off-training-set error) is the same.
  2. Give the intuition. If every labelling of the unseen points is equally likely, the training set tells you nothing about them. Every prediction there is a coin toss.
  3. Implication 1: no algorithm is best for every problem. “Gradient boosting beats k-NN” is a claim about the problems we actually meet, not about all possible problems.
  4. Implication 2: every algorithm makes assumptions, such as smoothness, linearity, locality, or translation invariance. These are its inductive bias. Choose an algorithm whose assumptions fit your domain, and compare candidates on your data with cross-validation.

Common mistakes

How long your answer should be

Half a page; 2–3 minutes: state the off-training-set result, the coin-toss intuition, and both practical implications.

Read this

Previous in Foundations: Derive the number of monomial features of degree at most p in d input variables, using a stars-and-bars counting argument. Check it for d=2, p=2 by listing the terms, then evaluate it for d=100, p=3 and explain why a polynomial kernel avoids building these features?
Next in Foundations: For least-squares linear regression with hat matrix H=X(X⊤X)−1X⊤, how do you prove that the leave-one-out residual is yi−y^(−i)=yi−y^i1−hii, so that leave-one-out cross-validation needs only one fit?