: middle, center


# `decision_tree()`

Specifies a decision tree model



```r
decision_tree(tree_depth = NULL, min_n = NULL, cost_complexity = NULL)
```

---
class: your-turn

# Your turn 7

Write a pipe to create a model that uses the rpart package to fit a regression tree. Use `fit_split()` and `collect_metrics()` to compare the RMSE here to one using the linear model for the same formula- which is better?

*Hint: you'll need https://tidymodels.github.io/parsnip/articles/articles/Models.html*

<div clas