CallbackTuning: Create Tuning Callback

CallbackTuningR Documentation

Create Tuning Callback

Description

Specialized bbotk::CallbackOptimization for tuning. Callbacks allow to customize the behavior of processes in mlr3tuning. The callback_tuning() function creates a CallbackTuning. Predefined callbacks are stored in the dictionary mlr_callbacks and can be retrieved with clbk(). For more information on tuning callbacks see callback_tuning().

Super classes

mlr3misc::Callback -> bbotk::CallbackOptimization -> CallbackTuning

Public fields

on_eval_after_design

(⁠function()⁠)
Stage called after design is created. Called in ObjectiveTuning$eval_many().

on_eval_after_benchmark

(⁠function()⁠)
Stage called after hyperparameter configurations are evaluated. Called in ObjectiveTuning$eval_many().

on_eval_before_archive

(⁠function()⁠)
Stage called before performance values are written to the archive. Called in ObjectiveTuning$eval_many().

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage
CallbackTuning$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# write archive to disk
callback_tuning("mlr3tuning.backup",
  on_optimization_end = function(callback, context) {
    saveRDS(context$instance$archive, "archive.rds")
  }
)

mlr3tuning documentation built on Nov. 21, 2023, 1:06 a.m.