powered by
This task specializes Task and TaskSupervised for regression problems. The target column is assumed to be numeric. The task_type is set to "classif".
task_type
"classif"
Predefined tasks are stored in the Dictionary mlr_tasks.
R6::R6Class object inheriting from Task/TaskSupervised.
t = TaskRegr$new(id, backend, target)
id :: character(1) Identifier for the task.
id
character(1)
backend :: (DataBackend | data.frame() | ...) Either a DataBackend, or any object which is convertible to a DataBackend with as_data_backend(). E.g., a data.frame() will be converted to a DataBackendDataTable.
backend
data.frame()
as_data_backend()
target :: character(1) Name of the target column.
target
See TaskSupervised.
Example regression tasks: boston_housing
boston_housing
Other Task: TaskClassif, TaskSupervised, Task, mlr_tasks
TaskClassif
TaskSupervised
Task
mlr_tasks
# NOT RUN { task = TaskRegr$new("iris", backend = iris, target = "Sepal.Length") task$task_type task$formula() task$truth() # possible properties: mlr_reflections$task_properties$regr # }
Run the code above in your browser using DataLab