Discovering the new Digital world

06 Apr 2017

K-Nearest Neighbors Applied: a Regression problem

I would like to share a “playground” example that I have been using to build up my knowledge and understanding of the KNN algorithm and its application. The exercise is inspired from from the example discussed in “Chapter 3. K-Nearest Neighbors” of “Thoughtful Machine Learning with Python” by Matthew Kirk, the application of the algorithm to a regression problem: the prediction of value of houses in the Seattle area.

Here is possible to find the notebook describing the application of the KNN algorithm to this specific problem. The supporting code & data can be found here.

The example has been implemented using Jupyter Notebook and the Python ecosystem. The ‘SciPy’ module has been used for the KNN/ KDTree implementation.

Enjoy the learnings…