Specialized bbotk::CallbackBatch for batch tuning.
Callbacks allow to customize the behavior of processes in mlr3tuning.
The callback_batch_tuning()
function creates a CallbackBatchTuning.
Predefined callbacks are stored in the dictionary mlr_callbacks and can be retrieved with clbk()
.
For more information on tuning callbacks see callback_batch_tuning()
.
Super classes
mlr3misc::Callback
-> bbotk::CallbackBatch
-> CallbackBatchTuning
Public fields
on_eval_after_design
(
function()
)
Stage called after design is created. Called inObjectiveTuningBatch$eval_many()
.on_eval_after_benchmark
(
function()
)
Stage called after hyperparameter configurations are evaluated. Called inObjectiveTuningBatch$eval_many()
.on_eval_before_archive
(
function()
)
Stage called before performance values are written to the archive. Called inObjectiveTuningBatch$eval_many()
.on_tuning_result_begin
(
function()
)
Stage called before the results are written. Called inTuningInstance*$assign_result()
.
Examples
# write archive to disk
callback_batch_tuning("mlr3tuning.backup",
on_optimization_end = function(callback, context) {
saveRDS(context$instance$archive, "archive.rds")
}
)
#> <CallbackBatchTuning:mlr3tuning.backup>
#> * Active Stages: on_optimization_end