OptimalK(CLEg) | R Documentation |
This function will provide the series of NN values by predicting the class in leave-one-out method. That is, we fit the model for all observations except one and then apply the rule to that left observation and find the predicted class.
OptimalK(i, x, cl, ...)
i |
the row numbers where to apply the leave-one-out method |
x |
data frame or matrix |
cl |
defining y vector taking values -1 and 1 for two classes |
... |
... |
the value of K
Shahidul Islam