There are many algorithms and models used in data science and machine learning. Each with varying degrees of complexity. A very simple, yet effective algorithm is K-Nearest Neighbors. This model uses target classes from training data to find the nearest data points to the testing data and makes a prediction based on them. As a project for Lamdba School, I wrote my own brute-force nearest neighbors algorithm and used it to predict iris flower types using the popular Iris dataset.

My GitHub repository for this project can be found here.

As well as a Medium blog post I wrote about the project, here.

I made several visulizations of how the algorithm works, calculating distances from the nearest data points to make predictions, such as the on below.

data plot