Create Machine Learning - K Nearest neighbours with cross validation

With a sample grid file, I have tried to reduce the errors and increase certainty by implementing K nearest neighbour alogrithm considering several permutations of data. Have also used to different different 'k' to close the error.