I am currently doing some prediction work using the knn script in the 'class' package. Does anyone know a way of having R return the IDs (sample IDs, or column IDs of the training matrix) of the 'k' samples that are chosen by the algorithm as being nearest to a given test sample?
I have searched/read everything I can about the script, however have not found anything other than the ability to output the proportion of 'k' samples agreeing with the final prediction (which is also quite useful). However I would still like the 'k' sample ID's, for further lookup and reporting steps in my process. Thanks in advance for any advice. Ryan [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.