Dear mailing list,

I am using the cforest() method from the party package to train a
randomForest with ten input parameters which sometimes contain "NA"s.
The predicted variable is a binary decision. Building the tree works
fine without warnings or error messages, but when using the predict()
statement for validation, I run in an error: 

forest <- cforest(V31 ~ V1+V2+V3, data=training)
prediction <- predict(forest, testset)
"Error in OOB && is.null(newdata) : invalid 'x' type in 'x && y'"

On the other hand: Creating a tree, using the ctree() method and
validating the prediction using the predict() method works fine:

tree <- ctree(V31 ~ V1+V2+V3, data=training)
prediction <- predict(tree, testset)

"training" and "testset" are sampled from the same data.frame. Does
anyone has an explanation for this behavior? I would like to test if
cforest() outperforms ctree()!

Thank you for your help!

Florian Kiefer

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to