I have a binary outcome variable and around 20 independent variables. I used "ctree" to obtain the decision tree model for the binary outcome variable. The number of nodes is more and I wanted to reduce the number of nodes. Also, since the number of nodes is more, the resultant decision tree visualization of the charts are clumsy. So, I kindly request how to reduce the number of nodes and also get a better visualization after fitting the "ctree" model.
The documentation of ctree says that you can manipulate control parameter 'alpha' to get simpler trees, by choosing smaller alpha values when you fit the ctree.
example
airq <- subset(airquality, !is.na(Ozone))
airct <- ctree(Ozone ~ ., data = airq)
airct2 <- ctree(Ozone ~ ., data = airq,
control = partykit::ctree_control(alpha=0.001))