A TaskGenerator creating two interleaving half circles ("moons") as binary classification problem.

Dictionary

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

mlr_task_generators$get("moons")
tgen("moons")

See also

Super class

mlr3::TaskGenerator -> TaskGeneratorMoons

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

TaskGeneratorMoons$new()


Method plot()

Creates a simple plot of generated data.

Usage

TaskGeneratorMoons$plot(n = 200, pch = 19L, ...)

Arguments

n

(integer(1))
Number of samples to draw for the plot. Default is 200.

pch

(integer(1))
Point char. Passed to plot().

...

(any)
Additional arguments passed to plot().


Method clone()

The objects of this class are cloneable with this method.

Usage

TaskGeneratorMoons$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

generator = tgen("moons") plot(generator, n = 200)
#> Warning: "data" is not a graphical parameter
#> Warning: "data" is not a graphical parameter
#> Warning: "data" is not a graphical parameter
#> Warning: "data" is not a graphical parameter
#> Warning: "data" is not a graphical parameter
#> Warning: "data" is not a graphical parameter
task = generator$generate(200) str(task$data())
#> Classes ‘data.table’ and 'data.frame': 200 obs. of 3 variables: #> $ y : Factor w/ 2 levels "A","B": 1 1 1 1 1 1 1 1 1 1 ... #> $ x1: num -2.22 -8.71 -5.97 -7.31 0.88 ... #> $ x2: num 7.381 4.309 5.342 -0.266 6.433 ... #> - attr(*, ".internal.selfref")=<externalptr>