Gradient LabSign up free

ML glossary › Neighbors

What is neighbors in machine learning?

The examples closest to a new point.

Where it shows up

Classification

k-nearest neighbors

Here is our map of students again, plus a new one (yellow) whose result we don’t know yet. The idea behind k-nearest neighbors is simple: you are probably like the people closest to you.

See neighbors in motion. The lesson animates it step by step, free.

Open the lesson

Related terms