Skip to contents

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(.key, ...)

tnrs(.keys, ...)



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 passed to the respective dictionary to retrieve multiple objects.


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


# random search tuner with batch size of 5
tnr("random_search", batch_size = 5)
#> <TunerRandomSearch>: Random Search
#> * Parameters: batch_size=5
#> * Parameter classes: ParamLgl, ParamInt, ParamDbl, ParamFct
#> * Properties: dependencies, single-crit, multi-crit
#> * Packages: mlr3tuning, bbotk

# run time terminator with 20 seconds
trm("run_time", secs = 20)
#> <TerminatorRunTime>: Run Time
#> * Parameters: secs=20