mlr3 (version 0.1.0-9000)

mlr_control: Execution Control Object

Description

This function creates a named list of settings which control the execution of a Learner.

  • store_models (logical(1)): If FALSE (default), models fitted during resample() and benchmark() are discarded. Note that you will be unable to predict on new data or extract additional information like variable importance from the learner.

  • encapsulate_train (character(1)): How to call external code in third party packages during train.

    • If set to "none" (default), the code is executed in the running session without error handling. Output is not stored, just send to the console.

    • If set to "evaluate", the exceptions are caught using evaluate::evaluate(). All output can be accessed via the learner field $log. evaluate does not start a separate session, and thus cannot guard you against segfaults.

    • If set to "callr", the code is executed in an independent R session using the callr package. All output can be accessed via the learner field $log. This guards your session from segfaults, at the cost of some computational overhead.

  • encapsulate_predict (character(1)): How to call external code in third party packages during predict. Same format as encapsulate_train.

Defaults

$store_models
TRUE

$encapsulate_train "none"

$encapsulate_predict "none"

$log_threshold 400

Usage

mlr_control(...)

Arguments

...

:: any Named arguments to overwrite the defaults / options. Settings may be provided in a name = value fashion, or by providing a single named list().

Value

(named list()) of all settings.

Examples

Run this code
# NOT RUN {
# get a list of the defaults
mlr_control()
# }

Run the code above in your browser using DataCamp Workspace