THIS IS A COPY FROM MLR3PIPELINES!
convert_task(
intask,
new_target = NULL,
new_type = NULL,
drop_original_target = TRUE,
drop_levels = FALSE,
...
)
Arguments
intask |
Task
A Task to be converted.
|
new_target |
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.
|
new_type |
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.
|
drop_original_target |
logical(1)
If TRUE (default), the original target is dropped. Otherwise it is
added as a feature.
|
drop_levels |
logical(1)
If TRUE , unused levels of the new target variable are dropped.
|
... |
any
Further arguments passed to the constructor of the task.
|
Value
Task
Details
The task's target is replaced by a different column from the data.
#FIXME: This needs detailed tests and should be moved to mlr3.