mlr3 (version 0.1.0-9000)

Generator: Generator Class

Description

Creates a Task of arbitrary size. Predefined task generators are stored in the Dictionary mlr_generators, e.g. xor.

Arguments

Format

R6::R6Class object.

Construction

g = Generator$new(id, task_type, packages = character(0L), param_set = ParamSet$new(), param_vals = list())
  • id :: character(1) Identifier for the learner.

  • task_type :: character(1) Type of the task the learner can operator on. E.g., "classif" or "regr".

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

  • param_set :: paradox::ParamSet Set of hyperparameters.

  • param_vals :: named list() List of hyperparameter settings.

Fields

  • id :: character(1) Identifier of the learner.

  • packages :: character() Stores the names of required packages.

  • param_set :: paradox::ParamSet Description of available hyperparameters and hyperparameter settings.

  • task_type :: character(1) Stores the type of class this learner can operate on, e.g. "classif" or "regr". A complete list of task types is stored in mlr_reflections$task_types.

Methods

  • generate(n) integer(1) -> Task Creates a task of type task_type with n observations, possibly using additional settings stored in param_set.

See Also

Other Generator: mlr_generators