K-Nearest Neighbors — A Complete Guide

Harshit Maheshwari
4 min readApr 4, 2021

K-Nearest Neighbors is a simple and easy to use supervised machine learning algorithm. It can be used for both classification as well as regression problems. The disparity is due to the dependent variable’s characteristics. The dependent variable in classification KNN is categorical whereas the dependent variable in regression KNN is continuous. We will look at both of these in detail with an example.

--

--

Harshit Maheshwari

Cultivating AI insights for over 5 years, I'm on a mission to demystify the machine learning landscape, one Medium article at a time.