So far, what I know is this: I can use extract fit parsnip engine and summary to present the rules from a decision tree model in tidymodels framework.
What I want to know is, is there a way to visualize the rules in better prettier ways? Like if? Can we integrate outside package to visualize decision tree with the summary from tidymodels extracted parsnip engine output?
I used C5 engine, and I found Plot a decision tree — plot.C5.0 • C50.
So I tried:
c5_obj_final <- whole_fit %>% extract_fit_engine() plot(c5_obj_final)
But it gave me an error:
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class ‘c("gg", "ggplot")’ to a data.frame