K-Nearest Neighbors Algorithm

A Breakdown of Classification With KNN

Jason Wong
Towards Data Science
10 min readDec 9, 2020

--

Photo by Dil on Unsplash

Overview

K-Nearest Neighbors (KNN) is a classification and regression algorithm which uses nearby points to generate predictions. It takes a point, finds the K-nearest points, and predicts a label for that point, K being user defined, e.g., 1,2,6. For classification, the algorithm uses the most frequent class of the…

--

--

Data Scientist with a passion for statistical analysis and machine learning