Tuner {mlr3tuning}R Documentation

Class for Tuning Algorithms

Description

The Tuner implements the optimization algorithm.

Details

Tuner is a abstract base class that implements the base functionality each tuner must provide. A subclass is implemented in the following way:

Private Methods

Resources

There are several sections about hyperparameter optimization in the mlr3book.

The gallery features a collection of case studies and demos about optimization.

Extension Packages

Additional tuners are provided by the following packages.

Public fields

id

(character(1))
Identifier of the object. Used in tables, plot and text output.

Active bindings

param_set

(paradox::ParamSet)
Set of control parameters.

param_classes

(character())
Supported parameter classes for learner hyperparameters that the tuner can optimize, as given in the paradox::ParamSet ⁠$class⁠ field.

properties

(character())
Set of properties of the tuner. Must be a subset of mlr_reflections$tuner_properties.

packages

(character())
Set of required packages. Note that these packages will be loaded via requireNamespace(), and are not attached.

label

(character(1))
Label for this object. Can be used in tables, plot and text output instead of the ID.

man

(character(1))
String in the format ⁠[pkg]::[topic]⁠ pointing to a manual page for this object. The referenced help package can be opened via method ⁠$help()⁠.

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
Tuner$new(
  id = "tuner",
  param_set,
  param_classes,
  properties,
  packages = character(),
  label = NA_character_,
  man = NA_character_
)
Arguments
id

(character(1))
Identifier for the new instance.

param_set

(paradox::ParamSet)
Set of control parameters.

param_classes

(character())
Supported parameter classes for learner hyperparameters that the tuner can optimize, as given in the paradox::ParamSet ⁠$class⁠ field.

properties

(character())
Set of properties of the tuner. Must be a subset of mlr_reflections$tuner_properties.

packages

(character())
Set of required packages. Note that these packages will be loaded via requireNamespace(), and are not attached.

label

(character(1))
Label for this object. Can be used in tables, plot and text output instead of the ID.

man

(character(1))
String in the format ⁠[pkg]::[topic]⁠ pointing to a manual page for this object. The referenced help package can be opened via method ⁠$help()⁠.


Method format()

Helper for print outputs.

Usage
Tuner$format(...)
Arguments
...

(ignored).

Returns

(character()).


Method print()

Print method.

Usage
Tuner$print()
Returns

(character()).


Method help()

Opens the corresponding help page referenced by field ⁠$man⁠.

Usage
Tuner$help()

Method optimize()

Performs the tuning on a TuningInstanceSingleCrit or TuningInstanceMultiCrit until termination. The single evaluations will be written into the ArchiveTuning that resides in the TuningInstanceSingleCrit/TuningInstanceMultiCrit. The result will be written into the instance object.

Usage
Tuner$optimize(inst)
Arguments
Returns

data.table::data.table()


Method clone()

The objects of this class are cloneable with this method.

Usage
Tuner$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package mlr3tuning version 0.20.0 Index]