I build a model using Random Forest and tried to test it on another database using predict(). However, it only returns NA.
RF=randomForest(intention~., data=train,ntree=1000,na.action=na.roughfix)
#no NA in the train nor the test dataset
# Predicting
pred <-predict(RF, newdata=test,type="response")
#pred vector is only set to NA
I checked this page and checked my datasets have no NA. However I keep continue having the same return. https://www.kaggle.com/c/the-analytics-edge-mit-15-071x/discussion/7808
I also checked this page, but it doesn't seem accurate for Random Forest (or I do not understand it). r - loess prediction returns NA
Thank for your help !