11.2 Decision trees
https://tidymodels.github.io/parsnip/articles/articles/Models.html
Fit a decision tree using rpart
rt_spec <- parsnip::decision_tree() %>%
parsnip::set_engine("rpart") %>%
parsnip::set_mode("regression")
rt_wf
## ══ Workflow ═════════════════════════════════════════════════════════════════
## Preprocessor: Formula
## Model: decision_tree()
##
## ── Preprocessor ─────────────────────────────────────────────────────────────
## Sale_Price ~ Gr_Liv_Area
##
## ── Model ────────────────────────────────────────────────────────────────────
## Decision Tree Model Specification (regression)
##
## Computational engine: rpart