Show that, as , the error rate of the 1-nearest-neighbour classifier for two classes is at most , where is the Bayes error. What does it say numerically for ?
Supervised learning, k-nearest neighbours
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can derive the Cover–Hart bound: the nearest neighbour's label behaves like an independent draw from the posterior.
Key idea
Given with posterior , the 1-NN error tends to , and .
Steps
- As , the nearest neighbour of gets arbitrarily close to , so its posterior is . Its label is then a fresh draw with , independent of the test label .
- 1-NN is wrong when . So .
- The Bayes error at is , and because the product is symmetric. So the 1-NN error is .
- Expand: , using .
- By Jensen's inequality, (equivalently ). Hence .
- Since , the 1-NN error is at most twice the Bayes error. For : .
- Interpretation: 1-NN copies a single noisy label, so it is at most about twice as bad as the best possible rule. With a bigger , the bound improves towards .
Common mistakes
- Applying the bound to a finite . It is an asymptotic result and needs .
- Writing . A classifier cannot beat the Bayes error.
- Forgetting the symmetry of when relating it to the Bayes error .
How long your answer should be
One page; 8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: For a kernel density estimate in one dimension, derive the leading terms of its bias and variance at a point . Hence what is the bandwidth that minimises the asymptotic mean squared error, and at what rate does the error shrink with ?
Next in Supervised learning: LDA and logistic regression both give linear decision boundaries. When would you expect each to do better, and why, in terms of data size, model correctness and outliers?