Supervised Learning - K Nearest Neighbors

What we will learn here


This is an in-depth tutorial written to introduce a simple, yet powerful algorithm called K-Nearest-Neighbors (KNN) for Classification & Regression problems.

Our First ML model developed for Iris dataset in previous post to classify the species of iris flower is a classic example of classificaiton problem.

We will go over the intuition and theoretical detail of the algorithm, apply it to both synthetic & real-world dataset to see exactly how it works, and gain an intrinsic understanding of its inner-workings by writing code from scratch & tuning its most important parameter num_neighbor to see its effect on model complexity and generalization. Finally, we will explore the imporant parameters of the model, its strength & weakness.


Supervised Learning - K Nearest Neighbors - Notebook






For further reading



« Previous: Our First ML Model Next: Linear Regression »