Hands-on: Setup + ML Demo (R)

Day 1 | Setting Up Your Analysis Environment with tidymodels

Open in Google Colab

Click the badge below to open this notebook directly in Colab:

Open In Colab
ImportantR Runtime Required

After opening in Colab, change the runtime to R: Runtime > Change runtime type > R

TipSave Your Work

After opening, go to File > Save a copy in Drive to save your progress.

Learning Objectives

In this hands-on session, you will:

  1. Set up a Google Colab notebook with R and tidymodels
  2. Load and explore the workshop dataset using tidyverse
  3. Create initial visualizations with ggplot2
  4. See overfitting in action
  5. Understand why train/test splits and cross-validation matter

Prerequisites

  • Google account with Colab access
  • Completed Computing Setup guide
  • Basic familiarity with R (helpful but not required)

Key R Packages

Package Purpose
tidymodels ML framework (recipes, parsnip, rsample, tune)
tidyverse Data manipulation and visualization
ggplot2 Visualization

After This Session

You will have:

  • A working R environment in Colab
  • Familiarity with the workshop dataset
  • Visual intuition for overfitting
  • Understanding of why we need validation strategies

Python Version

Looking for Python? See the Python version of this notebook.