| CallbackBatch | R Documentation |
Specialized mlr3misc::Callback for batch optimization.
Callbacks allow to customize the behavior of processes in bbotk.
The callback_batch() function creates a CallbackBatch.
Predefined callbacks are stored in the dictionary mlr_callbacks and can be retrieved with clbk().
For more information on optimization callbacks see callback_batch().
mlr3misc::Callback -> CallbackBatch
on_optimization_begin(function())
Stage called at the beginning of the optimization.
Called in Optimizer$optimize().
on_optimizer_before_eval(function())
Stage called after the optimizer proposes points.
Called in OptimInstance$eval_batch().
on_optimizer_after_eval(function())
Stage called after points are evaluated.
Called in OptimInstance$eval_batch().
on_result_begin(function())
Stage called before the results are written.
Called in OptimInstance$assign_result().
on_result_end(function())
Stage called after the results are written.
Called in OptimInstance$assign_result().
on_optimization_end(function())
Stage called at the end of the optimization.
Called in Optimizer$optimize().
clone()The objects of this class are cloneable with this method.
CallbackBatch$clone(deep = FALSE)
deepWhether to make a deep clone.
callback_batch()
# write archive to disk
callback_batch("bbotk.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.