create a function to predict small changes with K-NN