Good day,
for presentation purposes I would like to plot a couple of decision trees from a random forest (with about 100 trees). I found a post from last year where its clear is not really possible or there is not an function using tidymodels. R: Tidymodels: Is it possible to plot the trees for a random forest model in tidy models?
I´m wondering if somebody has found a way, I remember I could easily do this using the "Caret" package. but tidymodels makes everything so convenient I was hoping for someone with a solution.
Many thanks!
Summarizing what trees can be ploted with tidymodels based in comments comments and other Stackoverflow posts
rpart.plot()
seems to be the most popular.You should be able to use a function like
xgb.plot.tree()
with a trained tidymodels workflow or parsnip model by extracting out the underlying object created with the xgboost engine. You can do this withextract_fit_engine()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.