K-Nearest Neighbors

Back to Classical ML Algorithms

Instance-based learning that classifies new points based on the majority vote of their k nearest neighbors. No training phase — all computation happens at prediction time.

Key Properties

  • Instance-based (lazy) learning
  • Distance metrics: Euclidean, Manhattan, Cosine
  • Choice of k controls bias-variance tradeoff

ml knn instance-based