[R] How to do knn regression

From: Menghui Chen <menghui_at_gmail.com>
Date: Tue 22 Mar 2005 - 03:17:16 EST

How can I do a simple k nearest neighbor regression in R? My training data have 1 predictor and 1 outcome, both are numeric. I also need to use FPE and SC to find the optimal model. I know there is knn() in class package, but it's for knn classification. I also find a kknn package. What function should I use?

Thanks in advance!


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Mar 22 03:21:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:51 EST