CallbackBatchFSelect: Create Feature Selection Callback

CallbackBatchFSelectR Documentation

Create Feature Selection Callback

Description

Specialized bbotk::CallbackBatch for feature selection. Callbacks allow customizing the behavior of processes in mlr3fselect. The callback_batch_fselect() function creates a CallbackBatchFSelect. Predefined callbacks are stored in the dictionary mlr_callbacks and can be retrieved with clbk(). For more information on callbacks see callback_batch_fselect().

Super classes

mlr3misc::Callback -> bbotk::CallbackBatch -> CallbackBatchFSelect

Public fields

on_eval_after_design

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

on_eval_after_benchmark

(⁠function()⁠)
Stage called after feature sets are evaluated. Called in ObjectiveFSelectBatch$eval_many().

on_eval_before_archive

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

on_auto_fselector_before_final_model

(⁠function()⁠)
Stage called before the final model is trained. Called in AutoFSelector$train(). This stage is called after the optimization has finished and the final model is trained with the best feature set found.

on_auto_fselector_after_final_model

(⁠function()⁠)
Stage called after the final model is trained. Called in AutoFSelector$train(). This stage is called after the final model is trained with the best feature set found.

Methods

Public methods

Inherited methods

CallbackBatchFSelect$clone()

The objects of this class are cloneable with this method.

Usage
CallbackBatchFSelect$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# Write archive to disk
callback_batch_fselect("mlr3fselect.backup",
  on_optimization_end = function(callback, context) {
    saveRDS(context$instance$archive, "archive.rds")
  }
)

mlr3fselect documentation built on Aug. 23, 2026, 5:08 p.m.