AI Rookies

KNN — k-Nearest Neighbors

Fact

KNN predicts by letting the k closest examples vote or average.

In Plain Words

KNN is like choosing pizza by asking the nearest kids in the cafeteria. If three nearby kids yell “pepperoni,” KNN orders pepperoni.

It uses nearby examples to sort things or guess numbers. It can spot oddballs too, but big data makes neighbor hunting slow.

Related Concepts

Supervised Learning
KNN is a supervised learning method that uses labeled examples directly.

Classification
KNN lets the nearest neighbors vote for the class.

Regression
KNN averages nearby values to predict a number.

Curse of Dimensionality
With too many features, distance gets blurry and KNN can miss.