What does the KNN decision boundary look like when k = 1?

Quick Overview

Asks what the decision boundary of a k-nearest neighbors classifier looks like when k equals 1. Tests how KNN partitions feature space, how noisy points affect the boundary, and the bias and variance behavior of a very small k.

What does the KNN decision boundary look like when k = 1?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You have a k-nearest neighbors classifier trained on a labeled dataset. What does its decision boundary look like when `k = 1`? ```hint Regions of space For each training point, picture the set of locations where that point is the closest one. What label does every location in that set get? ``` ```hint Noise Think about what happens around a single mislabeled training point, and what the training error must be. ``` ### What a Strong Answer Covers - How `k = 1` partitions the feature space and assigns a label to each region - The shape of the boundary pieces under Euclidean distance, and how a different metric changes them - How noisy or mislabeled points show up in the boundary - Training error, variance, and the asymptotic error guarantee for 1-NN - How increasing k changes the boundary ### Follow-up Questions - How does rescaling one feature change the 1-NN boundary? - What does the boundary look like as k approaches the number of training points? - Why does 1-NN tend to degrade as the number of dimensions grows? - How would you pick k in practice, and what would you expect to see in the validation curve?

Overview: Asks what the decision boundary of a k-nearest neighbors classifier looks like when k equals 1. Tests how KNN partitions feature space, how noisy points affect the boundary, and the bias and variance behavior of a very small k.

General logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

You have a k-nearest neighbors classifier trained on a labeled dataset. What does its decision boundary look like when k = 1?

What a Strong Answer Covers Guidance

  • How k = 1 partitions the feature space and assigns a label to each region
  • The shape of the boundary pieces under Euclidean distance, and how a different metric changes them
  • How noisy or mislabeled points show up in the boundary
  • Training error, variance, and the asymptotic error guarantee for 1-NN
  • How increasing k changes the boundary

Follow-up Questions Guidance

  • How does rescaling one feature change the 1-NN boundary?
  • What does the boundary look like as k approaches the number of training points?
  • Why does 1-NN tend to degrade as the number of dimensions grows?
  • How would you pick k in practice, and what would you expect to see in the validation curve?