| mlr_tasks | R Documentation |
A simple mlr3misc::Dictionary storing objects of class Task.
Each task has an associated help page, see mlr_tasks_[id].
This dictionary can get populated with additional tasks by add-on packages, e.g. mlr3data, mlr3proba or mlr3cluster. mlr3oml allows to interact with OpenML.
For a more convenient way to retrieve and construct tasks, see tsk()/tsks().
R6::R6Class object inheriting from mlr3misc::Dictionary.
See mlr3misc::Dictionary.
as.data.table(dict, ..., objects = FALSE)
mlr3misc::Dictionary -> data.table::data.table()
Returns a data.table::data.table() with columns "key", "label", "task_type", "nrow", "ncol", "properties",
and the number of features of type "lgl", "int", "dbl", "chr", "fct" and "ord", respectively.
If objects is set to TRUE, the constructed objects are returned in the list column named object.
Sugar functions: tsk(), tsks()
Extension Packages: mlr3data
Other Dictionary:
mlr_learners,
mlr_measures,
mlr_resamplings,
mlr_task_generators
Other Task:
Task,
TaskClassif,
TaskRegr,
TaskSupervised,
TaskUnsupervised,
california_housing,
mlr_tasks_breast_cancer,
mlr_tasks_german_credit,
mlr_tasks_iris,
mlr_tasks_mtcars,
mlr_tasks_penguins,
mlr_tasks_pima,
mlr_tasks_sonar,
mlr_tasks_spam,
mlr_tasks_wine,
mlr_tasks_zoo
as.data.table(mlr_tasks)
task = mlr_tasks$get("penguins") # same as tsk("penguins")
head(task$data())
# Add a new task, based on a subset of penguins:
data = palmerpenguins::penguins
data$species = factor(ifelse(data$species == "Adelie", "1", "0"))
task = TaskClassif$new("penguins.binary", data, target = "species", positive = "1")
# add to dictionary
mlr_tasks$add("penguins.binary", task)
# list available tasks
mlr_tasks$keys()
# retrieve from dictionary
mlr_tasks$get("penguins.binary")
# remove task again
mlr_tasks$remove("penguins.binary")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.