AE 6: The Office

Cross validation

Important

Go to the course GitHub organization and locate the repo titled ae-6-the-office-cv-YOUR_GITHUB_USERNAME to get started.

Packages

library(tidyverse)
library(tidymodels)
library(knitr)

Load data

office_episodes <- read_csv("data/office_episodes.csv")

Split data into training and testing

Split your data into testing and training sets.

# add code here

Specify model

Specify a linear regression model. Call it office_spec.

# add code here

Create recipe

Create the recipe from class. Call it office_rec1.

# add code here

Create workflow

Create the workflow that brings together the model specification and recipe. Call it office_wflow1.

# add code here

Cross validation

Conduct 10-fold cross validation.

# add code here

Summarize CV metrics

Summarize metrics from your CV resamples.

# add code here

Another model - Model 2

Create a different (simpler, involving fewer variables) recipe and call it office_rec2. Conduct 10-fold cross validation and summarize metrics. Describe how the two models compare to each other based on cross validation metrics.