AI & Machine LearningMachine Learning

Nearest Neighbor

A new item can be classified by the examples most like it

Show a computer a fruit it's never seen. It knows no rules about fruit, yet it can usually guess what it is. How?

You'll find out

  • How a computer decides what's alike
  • How many neighbors should get a vote
  • Why an apple can get called a pear

Why it matters

Apps can use the same trick to suggest movies. Knowing how it works tells you when to trust it, and when not to.

About 3 min6 interactive slides · 5 questionsLesson 45 · Zone 5

Play this lesson

Free to play in your browser or on iPhone

More in this zone

  1. 37Data CommunicationThe Packet PuzzleYour message is chopped up and rebuilt at the other end
  2. 38Digital ImagingRolling ShutterWhy your phone bends propellers into banana shapes
  3. 39AlgorithmsGuess My Number in 7 TriesBinary search halves the possibilities to find your number fast
  4. 40Civil EngineeringWhy Concrete Needs SteelConcrete is strong under squeezing and weak under stretching
  5. 41ProbabilitySpot the Fake Coin FlipsPeople faking random flips almost never write long streaks
  6. 42Error DetectionYour Card's Last Digit Is a Lie DetectorThe final digit of a card number checks all the others
  7. 43Computing HistoryThe 1890 Census Ran on Punch CardsHoles in cardboard counted a nation, and IBM grew from it
  8. 44Quantum MechanicsThe Double-Slit SurpriseSingle particles build a pattern only waves should make