tnr: Syntactic Sugar for Tuning Objects Construction

View source: R/sugar.R

tnrR Documentation

Syntactic Sugar for Tuning Objects Construction

Description

Functions to retrieve objects, set parameters and assign to fields in one go. Relies on mlr3misc::dictionary_sugar_get() to extract objects from the respective mlr3misc::Dictionary:

  • tnr() for a Tuner from mlr_tuners.

  • tnrs() for a list of Tuners from mlr_tuners.

  • trm() for a Terminator from mlr_terminators.

  • trms() for a list of Terminators from mlr_terminators.

Usage

tnr(.key, ...)

tnrs(.keys, ...)

Arguments

.key

(character(1))
Key passed to the respective dictionary to retrieve the object.

...

(named list())
Named arguments passed to the constructor, to be set as parameters in the paradox::ParamSet, or to be set as public field. See mlr3misc::dictionary_sugar_get() for more details.

.keys

(character())
Keys passed to the respective dictionary to retrieve multiple objects.

Value

R6::R6Class object of the respective type, or a list of R6::R6Class objects for the plural versions.

Examples

# random search tuner with batch size of 5
tnr("random_search", batch_size = 5)

# run time terminator with 20 seconds
trm("run_time", secs = 20)

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