Skip to contents

A TaskGenerator for the friedman1 task in mlbench::mlbench.friedman1().

Dictionary

This TaskGenerator can be instantiated via the dictionary mlr_task_generators or with the associated sugar function tgen():

mlr_task_generators$get("friedman1")
tgen("friedman1")

Parameters

IdTypeDefaultRange
sdnumeric1\([0, \infty)\)

See also

Other TaskGenerator: TaskGenerator, mlr_task_generators, mlr_task_generators_2dnormals, mlr_task_generators_cassini, mlr_task_generators_circle, mlr_task_generators_moons, mlr_task_generators_peak, mlr_task_generators_simplex, mlr_task_generators_smiley, mlr_task_generators_spirals, mlr_task_generators_xor

Super class

mlr3::TaskGenerator -> TaskGeneratorFriedman1

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method clone()

The objects of this class are cloneable with this method.

Usage

TaskGeneratorFriedman1$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

generator = tgen("friedman1")
task = generator$generate(200)
str(task$data())
#> Classes ‘data.table’ and 'data.frame':	200 obs. of  11 variables:
#>  $ y           : num  5.32 16.53 21.87 5.97 14.48 ...
#>  $ important1  : num  0.6182 0.7875 0.6566 0.0142 0.5908 ...
#>  $ important2  : num  0.118 0.631 0.5 0.312 0.398 ...
#>  $ important3  : num  0.671 0.242 0.293 0.32 0.479 ...
#>  $ important4  : num  0.16 0.367 0.821 0.426 0.537 ...
#>  $ important5  : num  0.121 0.388 0.852 0.208 0.454 ...
#>  $ unimportant1: num  0.507 0.653 0.556 0.444 0.865 ...
#>  $ unimportant2: num  0.585 0.804 0.723 0.061 0.111 ...
#>  $ unimportant3: num  0.335 0.299 0.883 0.715 0.186 ...
#>  $ unimportant4: num  0.104 0.446 0.75 0.272 0.321 ...
#>  $ unimportant5: num  0.583 0.88 0.624 0.197 0.222 ...
#>  - attr(*, ".internal.selfref")=<externalptr>