Skip to main content

K-Nearest Neighbors (KNN)

KNN is the friendliest ML algorithm.

"You are the average of your closest friends"​

If you want to classify a new point, KNN just finds the K closest dots and takes a democratic vote based on distance!

Python Implementation​

K-Nearest Neighbors (KNN) 2D Classifier