Learn R Programming

mlr3tuning (version 0.20.0)

mlr3tuning.backup: Backup Benchmark Result Callback

Description

This CallbackTuning writes the mlr3::BenchmarkResult after each batch to disk.

Arguments

Examples

Run this code
clbk("mlr3tuning.backup", path = "backup.rds")

# tune classification tree on the pima data set
instance = tune(
  tuner = tnr("random_search", batch_size = 2),
  task = tsk("pima"),
  learner = lrn("classif.rpart", cp = to_tune(1e-04, 1e-1, logscale = TRUE)),
  resampling = rsmp("cv", folds = 3),
  measures = msr("classif.ce"),
  term_evals = 4,
  callbacks = clbk("mlr3tuning.backup", path = tempfile(fileext = ".rds"))
)

Run the code above in your browser using DataLab