Math · Advanced · Lesson 1 of 8
Nearest Neighbours
Guess from the most similar examples
An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.
What you’ll learn
- k-NN predicts by majority vote of the k most similar examples.
- Small k follows quirks; large k over-smooths.
- Scale features before measuring distances.
Steps
- What kind of fruit?
- How far apart?
- Ask more neighbours
- Too many neighbours
- Different units
- The cost of remembering