Skip to content

Commit 7259730

Browse files
removed text that causes poor image alignment
1 parent 4ef5ed6 commit 7259730

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

classification2.Rmd

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -731,27 +731,6 @@ vfold_metrics
731731
In this case, using 10-fold instead of 5-fold cross validation did reduce the standard error, although
732732
by only an insignificant amount. In fact, due to the randomness in how the data are split, sometimes
733733
you might even end up with a *higher* standard error when increasing the number of folds!
734-
We can make the reduction in standard error more dramatic by increasing the number of folds
735-
by a large amount. In the following code we show the result when $C = 50$;
736-
picking such a large number of folds often takes a long time to run in practice,
737-
so we usually stick to 5 or 10.
738-
739-
```{r 06-50-fold-seed, echo = FALSE, warning = FALSE, message = FALSE}
740-
# hidden seed
741-
set.seed(1)
742-
```
743-
744-
```{r 06-50-fold}
745-
cancer_vfold_50 <- vfold_cv(cancer_train, v = 50, strata = Class)
746-
747-
vfold_metrics_50 <- workflow() |>
748-
add_recipe(cancer_recipe) |>
749-
add_model(knn_spec) |>
750-
fit_resamples(resamples = cancer_vfold_50) |>
751-
collect_metrics()
752-
753-
vfold_metrics_50
754-
```
755734

756735
### Parameter value selection
757736

0 commit comments

Comments
 (0)