### honest (i.e., out-of-bag) cross-classification of
### true vs. predicted classes
table(mammoexp$ME, predict(cforest(ME ~ ., data = mammoexp, B = 50),
OOB = TRUE))
### fit forest to censored response
if (require("ipred")) {
data("GBSG2", package = "ipred")
bst <- cforest(Surv(time, cens) ~ ., data = GBSG2, B = 50)
### estimate conditional Kaplan-Meier curves
treeresponse(bst, newdata = GBSG2[1:2,], OOB = TRUE)
### if you can't resist to look at individual trees ...
party:::prettytree(bst@ensemble[[1]], names(bst@data@get("input")))
}Run the code above in your browser using DataLab