mlr3 (version 0.1.0)

mlr_tasks: Dictionary of Tasks

Description

A simple Dictionary storing objects of class Task. Each task has an associated help page, see mlr_tasks_[id].

Arguments

Methods

See Dictionary.

S3 methods

See Also

Example tasks:

Other Dictionary: mlr_generators, mlr_learners, mlr_measures, mlr_resamplings

Other Task: TaskClassif, TaskRegr, TaskSupervised, Task, mlr_generators

Examples

Run this code
# NOT RUN {
as.data.table(mlr_tasks)
mlr_tasks$get("iris")
head(mlr_tasks$get("iris")$data())

# Add a new task, based on a subset of iris:
data = iris
data$Species = factor(ifelse(data$Species == "setosa", "1", "0"))
task = TaskClassif$new("iris.binary", data, target = "Species", positive = "1")

# add to dictionary
mlr_tasks$add("iris.binary", task)

# list available tasks
mlr_tasks$keys()

# retrieve from dictionary
mlr_tasks$get("iris.binary")

# remove task again
mlr_tasks$remove("iris.binary")
# }

Run the code above in your browser using DataCamp Workspace