In this tutorial, we implement K-Nearest Neighbor (KNN) with Python. We use this algorithm to predict a tumour as malignant or benign. The variable we are going to be predicting can have one of the 2 values: 0 or 1. A complete description of the database used can be consulted here .