1 - Introduction

Practical Machine Learning with tidymodels

Welcome!

Wi-Fi network name

Posit Conf 2026

Wi-Fi password

TBD

Venue information

  • There are gender neutral bathrooms located at TBD

  • A meditation/prayer room is located at room 332

  • A lactation room is located at room 333

Workshop policies

  • Please review the posit::conf code of conduct, which applies to all workshops: https://posit.co/code-of-conduct

  • CoC site has info on how to report a problem (in person, email, phone)

  • Please do not photograph people wearing red lanyards

Who are you?

  • You can use the magrittr %>% or base R |> pipe

  • You are familiar with functions from dplyr, tidyr, ggplot2

  • You have some exposure to basic statistical concepts like linear models and residuals

  • You do not need intermediate or expert familiarity with modeling or ML

Who are tidymodels?

  • Hannah Frick
  • Emil Hvitfeldt
  • Max Kuhn
  • Edgar Ruiz

Many thanks to Simon Couch, Davis Vaughan, Julia Silge, David Robinson, Julie Jung, Alison Hill, and DesirΓ©e De Leon for their role in creating these materials!

Introduce yourself to your neighbors πŸ‘‹

Getting the materials


If you are using Posit Cloud:

Log in to Posit Cloud (free): Link on Discord


If you are working locally:

# local download
usethis::use_course("https://github.com/tidymodels/workshops/archive/refs/heads/release.zip", destdir = "some_path")

Asking for help

πŸŸͺ β€œI’m stuck and need help!”

🟩 β€œI finished the exercise”

Discord

  • pos.it/conf-event-portal (login)
  • Click on β€œJoin Discord, the virtual networking platform!”
  • Browse Channels -> #workshop-tidymodels

πŸ‘€

πŸ‘€

Plan for this workshop

  • Your data budget
  • What makes a model
  • Evaluating models
  • Tuning models

What is machine learning?

What is machine learning?

What is machine learning? (2025 edition)

What is machine learning?

Your turn

How are statistics and machine learning related?

How are they similar? Different?

What is tidymodels?

library(tidymodels)
#> ── Attaching packages ──────────────────────────── tidymodels 1.5.0 ──
#> βœ” broom        1.0.13     βœ” rsample      1.3.2 
#> βœ” dials        1.4.4      βœ” tailor       0.1.0 
#> βœ” dplyr        1.2.1      βœ” tidyr        1.3.2 
#> βœ” infer        1.1.0      βœ” tune         2.1.0 
#> βœ” modeldata    1.6.0      βœ” workflows    1.3.0 
#> βœ” parsnip      1.6.0      βœ” workflowsets 1.1.1 
#> βœ” purrr        1.2.2      βœ” yardstick    1.4.0 
#> βœ” recipes      1.4.0
#> ── Conflicts ─────────────────────────────── tidymodels_conflicts() ──
#> βœ– purrr::discard() masks scales::discard()
#> βœ– dplyr::filter()  masks stats::filter()
#> βœ– dplyr::lag()     masks stats::lag()
#> βœ– recipes::step()  masks stats::step()

The whole game

  • Roadmap for today
  • Minimal version of predictive modeling process
  • Feature engineering and tuning as iterative extensions

The whole game

The whole game

The whole game

The whole game

The whole game

The whole game

The whole game

Let’s install some packages

If you are using your own laptop instead of Posit Cloud:

# Install the packages for the workshop
# fmt: skip
pkgs_core <- c("dimRed", "embed", "extrasteps", "future", "igraph", "mirai",
  "parallelly", "probably", "RANN", "ranger", "RcppML", "rpart.plot",
  "splines2", "tidymodels", "xgboost")

# fmt: skip
pkgs_extras <- c("bonsai", "brulee", "Cubist", "desirability2", "earth",
  "finetune", "important", "kknn", "lightgbm", "lme4", "rules", "stacks")

install.packages(c(pkgs_core, pkgs_extras))

# almanac was archived from CRAN on 2026-08-22:
install.packages("pak")
pak::pak("davisvaughan/almanac")

Our versions

R version 4.6.0 (2026-04-24), Quarto (1.10.18)

package version
almanac 1.0.0.9000
bonsai 0.4.1
broom 1.0.13
brulee 1.1.1
Cubist 0.6.0
CVST 0.2-3
desirability2 0.2.0
dials 1.4.4
dimRed 0.2.7
dplyr 1.2.1
DRR 0.0.5
earth 5.3.6
embed 1.2.2
extrasteps 0.3.0
package version
finetune 1.3.0
Formula 1.2-5
future 1.75.0
ggplot2 4.0.3
igraph 2.3.3
important 0.2.1
kernlab 0.9-33
kknn 1.4.1
lattice 0.22-9
lightgbm 4.7.0
lme4 2.0-6
mirai 2.7.2
modeldata 1.6.0
parallelly 1.48.0
package version
parsnip 1.6.0
patchwork 1.3.2
plotmo 3.7.0
plotrix 3.8-14
probably 1.2.0
purrr 1.2.2
ranger 0.18.0
RANN 2.6.3
RcppML 0.3.7.1
recipes 1.4.0
rpart 4.1.27
rpart.plot 3.1.5
rsample 1.3.2
rules 1.0.3
package version
scales 1.4.0
splines2 0.5.4
stacks 1.1.1
tailor 0.1.0
tidymodels 1.5.0
tidyr 1.3.2
tune 2.1.0
workflows 1.3.0
workflowsets 1.1.1
xgboost 3.2.1.1
yardstick 1.4.0