library(tidyverse)
library(tidymodels)
library(knitr)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
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 hereSpecify model
Specify a linear regression model. Call it office_spec.
# add code hereCreate recipe
Create the recipe from class. Call it office_rec1.
# add code hereCreate workflow
Create the workflow that brings together the model specification and recipe. Call it office_wflow1.
# add code hereCross validation
Conduct 10-fold cross validation.
# add code hereSummarize CV metrics
Summarize metrics from your CV resamples.
# add code hereAnother 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.