Help for model using "Ctree"?

Dear Community members,

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.

Thanks and regards,

Rajaram S

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))

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.