Specify the Algorithm and Workflow
Explore how to specify machine learning algorithms and construct workflows in R using the tidymodels suite. Understand how to configure decision trees with parsnip, set engines like rpart for classification, and combine data preparation with modeling into streamlined workflows. This lesson helps you build end-to-end reproducible models effectively.
We'll cover the following...
Configuring the algorithm
With the training data prepared, the next step in the tidymodels workflow is to specify the machine learning algorithm. At this workflow stage, hyperparameter values can be set. However, this lesson uses the algorithm’s default hyperparameter values.
Specifying algorithms is accomplished using the parsnip package. The parsnip package supports many algorithms, including decision trees. The following code uses the decision_tree() ...