diff --git a/model-assess.Rmd b/model-assess.Rmd index 80c955d..5594e00 100644 --- a/model-assess.Rmd +++ b/model-assess.Rmd @@ -4,6 +4,13 @@ title: Models assessment output: bookdown::html_chapter --- +```{r setup, include=FALSE} +library(purrr) +set.seed(1014) +options(digits = 3) +``` + + ## Multiple models A natural application of `map2()` is handling test-training pairs when doing model evaluation. This is an important modelling technique: you should never evaluate a model on the same data it was fit to because it's going to make you overconfident. Instead, it's better to divide the data up and use one piece to fit the model and the other piece to evaluate it. A popular technique for this is called k-fold cross validation. You randomly hold out x% of the data and fit the model to the rest. You need to repeat this a few times because of random variation.