Skip to main content
. 2016 Sep 27;6:34212. doi: 10.1038/srep34212

Figure 2. Evaluating the k-NN classifier for k = 1…10.

Figure 2

For each k, a 5-fold cross-validation was performed. The mean precision ± two standard deviations of the folds is shown in the figure (note the y-axis). k = 1 provides the most accurate classifier. However, k = 4 provides almost the same precision and is more robust to errors in the training set (reflected by the lower standard deviation). In general, the standard deviation is very small, indicating that the predictions are robust to changes in the training data.