# Install the packages for the workshop
<-
pkgs c("bonsai", "Cubist", "doParallel", "earth", "embed", "finetune",
"forested", "lightgbm", "lme4", "parallelly", "plumber", "probably",
"ranger", "rpart", "rpart.plot", "rules", "splines2", "stacks",
"text2vec", "textrecipes", "tidymodels", "vetiver")
install.packages(pkgs)
Welcome
These are the materials for workshops on tidymodels offered at posit::conf 2024. The tidymodels framework is a collection of packages for modeling and machine learning using tidyverse principles. This website hosts the materials for both the Introduction to tidymodels and Advanced tidymodels courses.
Introduction to tidymodels will teach you core tidymodels packages and their uses: data splitting/resampling with rsample, model fitting with parsnip, measuring model performance with yardstick, and model optimization using the tune package. Time permitting, you’ll be introduced to basic pre-processing with recipes. You’ll learn tidymodels syntax as well as the process of predictive modeling for tabular data.
Advanced tidymodels will teach you about model optimization using the tune and finetune packages, including racing and iterative methods. You’ll be able to do more sophisticated feature engineering with recipes. Time permitting, model ensembles via stacking will be introduced. This course is focused on the analysis of tabular data and does not include deep learning methods.
Is this workshop for me?
Depending on your background, one of Introduction to tidymodels or Advanced tidymodels might serve you better than the other.
Introduction to tidymodels
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 had some exposure to basic statistical concepts such as linear models, residuals, etc.
Intermediate or expert familiarity with modeling or machine learning is not required. Interested students who have intermediate or expert familiarity with modeling or machine learning may be interested in the Advanced tidymodels workshop.
Advanced tidymodels
This workshop is for you if you:
- have the prerequisite skills listed for the Introduction to tidymodels workshops,
- have used tidymodels packages like recipes, rsample, and parsnip, and
- have some experience with evaluating statistical models using resampling techniques like v-fold cross-validation or the bootstrap.
Participants who are new to tidymodels or machine learning will benefit from taking the Introduction to tidymodels workshop before joining this one. Participants who have completed the “Introduction to tidymodels” workshop will be well-prepared for this course.
Preparation
The process to set up your computer for either workshop will look the same. 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 RStudio Desktop (RStudio Desktop Open Source License, at least v2024.04.0), available at https://posit.co/download/rstudio-desktop/
- For all of the slides, the following R packages can be installed from the R console:
For the advanced course, you should install the newest version of the dials package (version 1.3.0). To check this, you can run:
::check_installed("dials", version = "1.3.0") rlang
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.
Introduction to tidymodels
- 01: Introduction
- 02: Your data budget
- 03: What makes a model?
- 04: Evaluating models
- 05: Tuning models
- 06: Wrapping up
Advanced tidymodels
Extra content (time permitting)
- Intro: Using workflowsets
- Intro: Using recipes
- Advanced: Transit case study (includes stacking)
- Advanced: Effect encoding
- Advanced: Model deployment
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
- 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.