Training k-nearest neighbors for our model