Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2021/iii/paper-218/5/b/solution
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 218 5 b Solution by
Codex 0 2026-09-28
The K-nearest neighbors algorithm takes the majority label among the training features closest to the query, with a stated tie rule. Its data-dependent risk is the conditional test error given the training sample, and denotes its expectation over that sample.
For one nearest neighbour, condition on a feature value and couple the coincident nearest feature as . The two labels are conditionally independent Bernoulli, so their mismatch probability isIntegration over gives
New to topics? Read the docs here!