callback_async_tuning {mlr3tuning} | R Documentation |
Create Asynchronous Tuning Callback
Description
Function to create a CallbackAsyncTuning.
Predefined callbacks are stored in the dictionary mlr_callbacks and can be retrieved with clbk()
.
Tuning callbacks can be called from different stages of the tuning process.
The stages are prefixed with on_*
.
Start Tuning - on_optimization_begin Start Worker - on_worker_begin Start Evaluation - on_eval_after_xs - on_eval_after_resample - on_eval_before_archive End Evaluation - on_worker_end End Worker - on_result - on_optimization_end End Tuning
See also the section on parameters for more information on the stages. A tuning callback works with ContextAsyncTuning.
Usage
callback_async_tuning(
id,
label = NA_character_,
man = NA_character_,
on_optimization_begin = NULL,
on_worker_begin = NULL,
on_eval_after_xs = NULL,
on_eval_after_resample = NULL,
on_eval_before_archive = NULL,
on_worker_end = NULL,
on_result = NULL,
on_optimization_end = NULL
)
Arguments
id |
( |
label |
( |
man |
( |
on_optimization_begin |
( |
on_worker_begin |
( |
on_eval_after_xs |
( |
on_eval_after_resample |
( |
on_eval_before_archive |
( |
on_worker_end |
( |
on_result |
( |
on_optimization_end |
( |
Details
When implementing a callback, each function must have two arguments named callback
and context
.
A callback can write data to the state ($state
), e.g. settings that affect the callback itself.
Tuning callbacks access ContextAsyncTuning.