-
Notifications
You must be signed in to change notification settings - Fork 0
/
ae-6-the-office-cv.qmd
96 lines (64 loc) · 1.38 KB
/
ae-6-the-office-cv.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
title: "AE 6: The Office"
subtitle: "Cross validation"
author: "Add your name here"
format: pdf
editor: visual
---
## Packages
```{r}
#| label: load-pkgs
#| message: false
library(tidyverse)
library(tidymodels)
library(knitr)
```
## Load data
```{r}
#| label: load-data
#| message: false
office_episodes <- read_csv("data/office_episodes.csv")
```
## Split data into training and testing
Split your data into testing and training sets.
```{r}
#| label: initial-split
# add code here
```
## Specify model
Specify a linear regression model.
Call it `office_spec`.
```{r}
#| label: specify-model
# add code here
```
## Create recipe
Create the recipe from class.
Call it `office_rec1`.
```{r}
#| label: create-recipe
# add code here
```
## Create workflow
Create the workflow that brings together the model specification and recipe.
Call it `office_wflow1`.
```{r}
#| label: create-wflow
# add code here
```
## Cross validation
Conduct 10-fold cross validation.
```{r}
#| label: cv-tenfold
# add code here
```
## Summarize CV metrics
Summarize metrics from your CV resamples.
```{r}
#| label: cv-summarize
# 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.