TaskClassif: Classification Task

Description Format Construction Fields Methods See Also Examples

Description

This task specializes Task and TaskSupervised for classification problems. The target column is assumed to be a factor. The task_type is set to "classif".

Additional task properties include:

Predefined tasks are stored in the mlr3misc::Dictionary mlr_tasks.

Format

R6::R6Class object inheriting from Task/TaskSupervised.

Construction

1
t = TaskClassif$new(id, backend, target, positive = NULL)

Fields

All methods from TaskSupervised, and additionally:

Methods

See TaskSupervised.

See Also

Example classification tasks: iris

Other Task: TaskRegr, TaskSupervised, Task, mlr_tasks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("Sonar", package = "mlbench")
task = TaskClassif$new("sonar", backend = Sonar, target = "Class", positive = "M")

task$task_type
task$formula()
task$truth()
task$class_names
task$positive

# possible properties:
mlr_reflections$task_properties$classif

mllg/mlr3 documentation built on Sept. 27, 2019, 9:38 a.m.