The task's target is replaced by a different column from the data. #FIXME: This needs detailed tests and should be moved to mlr3.
convert_task(
intask,
new_target = NULL,
new_type = NULL,
drop_original_target = TRUE,
drop_levels = FALSE,
...
)
character(1)
| NULL
New target to be set, must be a column in the intask
data.
If NULL
, no new target is set, and task is converted as-is.
character(1)
| NULL
The new task type. Must be in mlr_reflections$task_types
.
If NULL
(default), a new task with the same task_type is created.
logical(1)
If TRUE
(default), the original target is dropped. Otherwise it is
added as a feature.
logical(1)
If TRUE
, unused levels of the new target variable are dropped.
any
Further arguments passed to the constructor of the task.