Skip to content
Prev 387282 / 398502 Next

Help post

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.