Nearest Neighbour

Predict based on most similar images

  1. Memorize all data and labels
  2. Predict the label of the most similar training image

Training

Predict

Pasted image 20241129155523.png

Problem

Single nearest neighbor will be affected by outliers

K-Nearest Neighbors

Instead of copying from nearest neighbor, take a majority vote of k closest points

Never used for images

Pasted image 20241129160041.png

Hyperparameters