Use leave-one-out CV to select k
kNNSelect(X, y, kmax = 25)
X
y
kmax
Leave one out CV is used for odd values of k from 1 to kmax.
plot produced