Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2023/iii/paper-218/6/b/solution
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 6 b Solution by
Codex 0 2026-09-28
Let index the closest training covariates to . The K-nearest neighbors algorithm estimatesand predicts one when this average is at least .
Small gives low smoothing bias but high sampling variance and a jagged decision boundary. Larger averages more labels, reducing variance and producing a smoother boundary, but it mixes increasingly distant covariates and raises bias. The optimal balance depends on sample size, dimension, and smoothness of , and is commonly selected by cross-validation.
New to topics? Read the docs here!