Saturday 11:30 a.m.–noon

Know Thy Neighbor: Scikit and the K-Nearest Neighbor Algorithm

Portia Burton

Audience level:


One of the great features of Python is its machine learning capabilities. Scikit is a rich Python package which allows developers to create predictive apps. In this presentation, we will guess what type of music do Python programmers like to listen to, using Scikit and the k-nearest neighbor algorithm.


This presentation will give a brief overview of machine learning, the k-nearest neighbor algorithm and Scikit. Sometimes developers need to make decisions, even when they don't have all of the required information. Machine learning attempts to solve this problem by using known data (a training data sample) to make predictions about the unknown. For example, usually a user doesn't tell Amazon explicitly what type of book they want to read, but based on the user's history, and the user's demographic, Amazon is able to induce what the user might like to read. Scikit makes use of the k-nearest neighbor algorithm and allows developers to make predictions. Using training data one could make inferences such as what type of food, tv show, or music the user prefers. We will use machine learning, Scikit, and the k-nearest neighbor algorithm to guess which type of music a Python programmer likes to listen to.