I have some question, when use random forest to X_train, y_train, X_test, y_test.
When train the data, I use like this:
rf_train <- randomForest(y = y_train, x = X_train, ntree = 1000)
but, I have a question. Which one is correct to predict new data. :
1.
randomForest(y = y_test, x = X_test, ntree = 1000)
2.
predict(rf_train, X_test)
please tell me which one is right.
?predict.randomForest
– akrunrandomForest
package a while back. I still actually remember some of it ^ ^ – Tim Biegeleisen