Performing Cross-Validation

Learn how to use cross-validation to calculate accuracy estimates using tidymodels.

Coding the workflow

One of the many benefits of using the tidymodels family of R packages is the standardized approach it provides for coding machine learning workflows. The following code sets up a machine learning workflow for a CART classification decision tree:

  1. Preparing the training data.

  2. Declaring how the data should be used to train the model.

  3. Specifying the machine learning algorithm to be used.

  4. Orchestrating the workflow.

Get hands-on with 1400+ tech skills courses.