K-nearest neighbors algorithm

Why do you sometimes trust the crowd's opinion over your own?

Image: Balkiss.hamad, CC BY-SA 4.0, via Wikimedia Commons

K-nearest neighbors algorithm

Why do you sometimes trust the crowd's opinion over your own?

Imagine you're at a party and you want to guess someone's favorite color. Everyone around you has a different favorite, and you're trying to figure out what it might be.

You're relying on the idea that the person closest to you in age or personality might share your tastes. You're using the opinions of your immediate neighbors to make a guess.

Example

You're 25, and the person you're guessing for is 24. Everyone around them, including you, says they like blue. You decide to guess that the 24-year-old likes blue too.

Remember this

You're using the concept of k-nearest neighbors, where the "k" is 1 in this case, to predict the favorite color based on the closest neighbor's preference.

Related concepts

Swipe through more Machine Learning concepts

Open Pocket Polymath