K-Nearest Neighbors — A Complete Guide
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.