[R] KNN

Eivind K. Dovik he||o @end|ng |rom e|v|nddov|k@com
Thu Jun 21 18:46:05 CEST 2018


Yes, however using caret you  can do it directly 
using the preProcess parameter, e.g. train(y ~., data 
= train, method = "knn", preProcess = c("center", "scale")).

Hope this helps.


Eivind


On Thu, 21 Jun 2018, Jeff Reichman wrote:

> R-Help
>
>
>
> Does one need to normalize ones data is using the knn function within the
> caret Library.
>
>
>
> Jeff
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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.
>




More information about the R-help mailing list