Skip to content

Party extract BinaryTree from cforest?

1 message · Torsten Hothorn

#
library("party")
cf <- cforest(Species ~ ., data = iris)
pt <- party:::prettytree(cf at ensemble[[1]], names(cf at data@get("input")))
pt
nt <- new("BinaryTree")
nt at tree <- pt
nt at data <- cf at data
nt at responses <- cf at responses
nt
plot(nt)

will do.

Torsten