Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

mlr-org/mlr3-learndrake

Repository files navigation

mlr3-learndrake

fixed latest

The goal of mlr3-learndrake is to show how to use the mlr3 package framework in combination with the workflow package drake.

Usage

To clone this course, excecute the following code locally

usethis::use_course("mlr-org/mlr3-learndrake")

To install a fixed snapshot of the required R packages call

renv::restore()

To install the latest versions of the required R packages call

renv::hydrate()

After installing the dependencies, open the examples:

rstudioapi::openProject("01-intro", newSession = TRUE)
rstudioapi::openProject("02-benchmark", newSession = TRUE)

and call drake::r_make() to run the complete project:

  • This will build all R objects (or "targets" in drake's DSL) in the correct order.
  • You can visualize the project dependency structure via r_vis_drake_graph().
  • To load specific R objects into the global environment, call drake::loadd(<object name>).

See the drake manual for more information on {drake}.

Examples

01-intro: Hyperparameter tuning and training of a Random Forest classifier on the "iris" dataset

02-benchmark: Benchmark analysis of multiple learners using different hyperarameter ranges on the "iris" and "spam" dataset

Slides

drake logo

mlr3 logo

Other drake learning resources

Acknowledgements