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@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.
______________________________________________
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.