I'm learning R. I'm using the k-NN method to classify an artificial dataset that I've created (two attributes and two classes). In my code, I print the training and the test sets, but the classes predicted for the test set in the last plot are not "in concordance" to the examples in the training set (that is, the class of the test examples (using 1-NN) is obviously wrong seeing the distribution of the training examples).I'm learning R. I'm using the k-NN method to cl