I would like to build a BinaryTree at the top of the plot and make the second in the second part (bottom). Here is an example of code that shows that the tree graph completely ignores the split parameters specified by par ()
par(mfrow=c(1,2))
set.seed(290875)
airq <- subset(airquality, !is.na(Ozone))
airct <- ctree(Ozone ~ ., data = airq,
controls = ctree_control(maxsurrogate = 3))
airct
plot(airct)
mean((airq$Ozone - predict(airct))^2)
all.equal(predict(airct, type = "node"), where(airct))
irisct <- ctree(Species ~ .,data = iris)
irisct <- ctree(Species ~ .,data = iris)
This code does not display two (identical) trees in the same section (page). How can i fix this?
Even if after a very detailed answer it doesnβt work in this case: the plots created by "plot" and "ggplot" side by side
building ctree ignores all the set parameters.
source
share