CallbackBatchTuning | R Documentation |
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()
.
mlr3misc::Callback
-> bbotk::CallbackBatch
-> CallbackBatchTuning
on_eval_after_design
(function()
)
Stage called after design is created.
Called in ObjectiveTuningBatch$eval_many()
.
on_resample_begin
(function()
)
Stage called at the beginning of an evaluation.
Called in workhorse()
(internal).
on_resample_before_train
(function()
)
Stage called before training the learner.
Called in workhorse()
(internal).
on_resample_before_predict
(function()
)
Stage called before predicting.
Called in workhorse()
(internal).
on_resample_end
(function()
)
Stage called at the end of an evaluation.
Called in workhorse()
(internal).
on_eval_after_benchmark
(function()
)
Stage called after hyperparameter configurations are evaluated.
Called in ObjectiveTuningBatch$eval_many()
.
on_eval_before_archive
(function()
)
Stage called before performance values are written to the archive.
Called in ObjectiveTuningBatch$eval_many()
.
on_tuning_result_begin
(function()
)
Stage called before the results are written.
Called in TuningInstance*$assign_result()
.
clone()
The objects of this class are cloneable with this method.
CallbackBatchTuning$clone(deep = FALSE)
deep
Whether to make a deep clone.
# write archive to disk
callback_batch_tuning("mlr3tuning.backup",
on_optimization_end = function(callback, context) {
saveRDS(context$instance$archive, "archive.rds")
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.