tidy conditional inference tree. Creates easily interpretable decision tree models that be shown with the visualize_model function. Statistical significance required for a split , and minimum necessary samples in a terminal leaf can be controlled to create the desired tree visual.

tidy_ctree(.data, formula, minbucket = 7L, mincriterion = 0.95, ...)

Arguments

.data

dataframe

formula

formula

minbucket

minimum amount of samples in terminal leaves, default is 7

mincriterion

(1 - alpha) value between 0 -1, default is .95. lowering this value creates more splits, but less significant

...

optional parameters to ctree_control

Value

a ctree object

Examples


iris %>%
tidy_formula(., Sepal.Length) -> sepal_form

iris %>%
tidy_ctree(sepal_form) %>%
visualize_model()


iris %>%
tidy_ctree(sepal_form, minbucket = 30) %>%
visualize_model(plot_type = "box")