I am trying to make a simple estimate of the error of my Random Forest model in R (using package party). However, I get the error Error in w %*% response@predict_trafo : non-conformable arguments
when trying to predict the model on the test data.
Why is that? How can I fix the error?
Here is my code:
dat2_X_test <- dat2_X[1:5000,]
dat2_Y_test <- dat2_Y[1:5000]
dat2_X_train <- dat2_X[-c(1:5000), ]
dat2_Y_train <- dat2_Y[-c(1:5000)]
library(party)
forest_2 <- cforest(fmla, data = dat2_X_train, control = cforest_unbiased(mtry = 2))
propFewScat <- predict(forest_2, newdata = dat2_X_test, type="prob")