# Install the packages for the workshop
pkgs <-
c(
"almanac",
"betacal",
"bonsai",
"brulee",
"C50",
"Cubist",
"desirability2",
"dimRed",
"embed",
"extrasteps",
"finetune",
"forested",
"igraph",
"important",
"irlba",
"kknn",
"lightgbm",
"lme4",
"mirai",
"parallelly",
"plumber",
"probably",
"ranger",
"RANN",
"rpart",
"rpart.plot",
"RSpectra",
"rules",
"splines2",
"stacks",
"text2vec",
"textrecipes",
"tidymodels",
"uwot",
"vetiver"
)
install.packages(pkgs)Welcome
These are the materials for the Practical Machine Learning with tidymodels workshop. Learn how to successfully develop Machine Learning using R. tidymodels is a complete framework that implements modeling best practices using tidyverse principles. The tidymodels framework is a collection of packages for modeling and machine learning using tidyverse principles.
Led by Max Kuhn and Emil Hvitfeldt, this workshop will teach you core tidymodels packages to preprocess data, specify and train models, and optimize the tuning parameter. You’ll learn tidymodels syntax as well as the process of predictive modeling for tabular data. Time permitting, you’ll be introduced to basic pre-processing with recipes.
Is this workshop for me? 
This workshop is for you if you:
- are comfortable using tidyverse packages to read data into R, transform and reshape data, and make a variety of graphs, and
- have some experience with modeling, such as linear regression, logistic regression, or tree-based models.
While the workshop will teach some terminology and modeling philosophy, it is primarily focused on showing users how to effectively develop, iterate, and validate a machine learning model.
Preparation
Please join the workshop with a computer that has the following installed (all available for free):
- A recent version of R, available at https://cran.r-project.org/
- A recent version of an IDE, either
- RStudio Desktop (RStudio Desktop Open Source License, at least v2024.04.0), available at https://posit.co/download/rstudio-desktop/ or
- Positron (Desktop version, at least 2025.08.0-130), available at https://positron.posit.co/download.html
- For all of the slides, the following R packages can be installed from the R console:
Also, you should make sure that you have installed the newest version of a few packages. To check this, you can run the following code snippet. It will also prompt you to install the required versions if they are not already installed.
rlang::check_installed("tidymodels", version = "1.4.1")
rlang::check_installed("embed", version = "1.2.0")If you’re a Windows user and encounter an error message during installation noting a missing Rtools installation, install Rtools using the installer linked here.
Slides
These slides are designed to use with live teaching and are published for workshop participants’ convenience. They are not meant as standalone learning materials. For that, we recommend tidymodels.org and Tidy Modeling with R.
- 01: Introduction
- 02: Your data budget
- 03: What makes a model?
- 04: Evaluating models
- 05: Tuning models
- 06: Wrapping up
Extra content (time permitting)
- Using workflowsets
- Using recipes
- Model optimization by tuning
- Grid search via racing
- Feature engineering: dummies and embeddings
- Feature engineering: splines, target encoding and dates
- Postprocessing
- Feature selection
- Transit case study (includes stacking)
- Iterative search
There’s also a page for slide annotations; these are extra notes for selected slides.
Code
Quarto files for working along are available on GitHub. (Don’t worry if you haven’t used Quarto before; it will feel familiar to R Markdown users.)
Past workshops
English
- September 2025 at posit::conf()
- August 2025 at New York Data Science & AI Conference
- August 2024 at posit::conf()
- September 2023 at posit::conf()
- July 2023 at the New York R Conference
- August 2022 in Reykjavik
- July 2022 at rstudio::conf()
Spanish
Acknowledgments
This website, including the slides, is made with Quarto. Please submit an issue on the GitHub repo for this workshop if you find something that could be fixed or improved.
Reuse and licensing
Unless otherwise noted (i.e. not an original creation and reused from another source), these educational materials are licensed under Creative Commons Attribution CC BY-SA 4.0.