Pictured above is the result of my attempt to use kNN to classify data. The orange and light blue dots are two different types of data in my “training set”, which is the data set that has already been classified. The red and darker blue dots are the data of my “testing set”, which is the data that I classified using the training set.
The data could also have been classified using a naive Bayes classifier. The placement of orange and light blue dots shows that the position of the dots correlates with their classification. Thus, it is possible to classify the dots according to their positions only; the data on the fringes of the set would be dark blue, and the dots closer to the center would be red. Of course, this approach would likely be less accurate than kNN.