3

I am using the R-package party to build a random forest. The cforest function takes about 5 min to build a random forest model:

cf.model <- cforest(as.factor(y) ~ ., data = train.data, controls = cforest_control(ntree = 25, maxdepth = 6))

However, when I try to predict the training and test samples, the code sits there for hours, without giving me any output:

pTrain <- predict(cf.model, OOB = TRUE, type = "response")
pTest <- predict(cf.model, newdata = test.data, OOB = TRUE, type = "response")

Also tried the type = "prob" option without luck.

Would really appreciate any help with this. Does anyone else have the same problem? Should I be using different options to get the probability output.

I tried using ctree and that predicts just fine (and quite fast).

I am pretty sure I am doing something wrong here.

Thank you in advance!

Ashes
  • 31
  • 1

0 Answers0