seniorK-Nearest Neighbors
How does KNN relate to decision boundaries in feature space?
Updated May 16, 2026
Short answer
KNN forms highly irregular decision boundaries based on local density of training points.
Deep explanation
KNN does not learn an explicit boundary. Instead, its decision boundary emerges implicitly as regions where the majority of nearest neighbors belong to a class. This produces highly non-linear, jagged boundaries that closely follow data distribution but are sensitive to noise.
Real-world example
Medical diagnosis regions separating disease vs non-disease cases in feature space.
Common mistakes
- Assuming KNN learns smooth boundaries like logistic regression.
Follow-up questions
- Why are KNN boundaries non-linear?
- What affects boundary smoothness?