Build kNN from scratch in Python

With k-Fold Cross Validation (from scratch)

Chaitanya Krishna Kasaraneni
Towards Data Science
6 min readSep 13, 2020

--

Neighbors (Image Source: Freepik)

In this article, we shall understand how k-Nearest Neighbors (kNN) algorithm works and build kNN algorithm from ground up. We also shall evaluate our algorithm using the k-Fold cross-validation which is also developed from scratch.

After completing this tutorial you will know:

--

--