Nearest Neighbor Classifier

Nearest Neighbor Classifier



  • Have labeled “training” data (Supervised Learning )
  • For any image that should be classified, find the nearest neighbor
  • for some distance metric
  • and use the same labels

Variation: k-nearest neighbors #

  • compute the nearest_neighbor_classifier_2f3577c141850c11cc294882ab5d10fe5d98fa75.svg nearest neighbors
  • and take the majority vote of their labels
  • more “rounded” distribution
  • can handle outliers
  • you can end up with regions without a majority
  • Performance on the training data (actally not important metric -> overfitting):
Method Result
Nearest neighbor perfect result
k-nearest neighbors maybe wrong results
Calendar October 22, 2023