2
$\begingroup$

How to implement bagging with KNN using R in order to reduce the variability?

This is the R code that I use for KNN

knn.pred <- knn(training, testing, target_variable)
$\endgroup$

1 Answer 1

2
$\begingroup$

I am not sure that this is what you are asking for but the package FNN implements the bagged nn in its ownn function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.