The simplest classifier of all, and it doesn’t even ‘learn’: to label a new point, find its k nearest known points and take a vote. Birds of a feather. There’s no model, no training — just the whole dataset and a distance. Small k is jumpy and noise-sensitive; large k blurs the boundary. Slide the query point across the gap and watch the vote flip.
k-Nearest Neighbors classifies a query by the MAJORITY LABEL among its k closest training points (by Euclidean or other distance). It is a non-parametric, ‘lazy’ learner — no training phase, the whole dataset IS the model — and it approximates the Bayes-optimal boundary as data grows. Small k gives a jagged, low-bias/high-variance boundary; large k smooths it. It suffers the curse of dimensionality (distances lose meaning in high dimensions) and O(n) query cost. A fail-loud self-check throws unless a point near cluster A is labeled A and near cluster B is B. ◆ real machine learning, node-verified.
No learning, no compression — it stores everything and searches at query time; performance and the ‘right’ k depend on the data and distance metric. The majority-vote rule is exact.