In this chapter, you will test your knowledge and build a complete pipeline from scratch. Requirements:
data/
.Tips:
2-pipelines.Rmd
: write the first targets, then explore them, then add new targets gradually. Remember to check the graph and the manifest early and often.tar_target(pattern = map(...))
will help in some places, but not others. Throughout this short course, sometimes we branched over hyperparameters, while other times we branched over datasets. If you try to use branching everywhere, you risk overcomplicating the problem. And if you use branching nowhere, you will need to type out every single model by hand, which is not the recommended solution here.tar_map()
and tar_combine()
from the tarchetypes
package, but this is not required.7-challenge/functions.R
. test_model()
now omits some hyperparameters but includes the sizes of the training and testing datasets. Here is an example collection of model runs. So the model runs should look like the rows of this data frame.readRDS("7-challenge/runs.rds")
Start with a fresh data store.
library(targets) tar_destroy()
Begin with a blank _targets.R
file.
unlink("_targets.R") tar_edit()
One possible solution is at the bottom of 7-challenge/solution_targets.R
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.