I have pathogen (1/0) as a dependent variable and total (count) as independent variable. I have to get 1) KNN on total and 2) get the training error and training TPR and FPR for k = 5 nearest neighbors using total as a predictor. and 3) get a plot of training error vs. k for k = 1, 2, ..., 10 with k on the x-axis.
I am not sure how to do this in R. Also, how to know which value(s) of K would be the most biased in the training error estimate? Help would be appreciated. Thanks Bijesh Mishra. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.