The task's target is replaced by a different column from the data.
Usage
convert_task(
intask,
target = NULL,
new_type = NULL,
drop_original_target = FALSE,
drop_levels = TRUE
)Arguments
- intask
- target
(
character(1))
New target to be set, must be a column in theintaskdata. IfNULL, no new target is set, and task is converted as-is.- new_type
(
character(1))
The new task type. Must be inmlr_reflections$task_types]. IfNULL(default), a new task with the same task_type is created.- drop_original_target
(
logical(1))
IfFALSE(default), the original target is added as a feature. Otherwise the original target is dropped.- drop_levels
(
logical(1))
IfTRUE(default), unused levels of the new target variable are dropped.
Value
Task of requested type.