Convert object to a mlr3::TaskClassif.
Usage
# S3 method for sf
as_task_classif(
x,
target = NULL,
id = deparse(substitute(x)),
positive = NULL,
label = NA_character_,
task_train = NULL,
...
)
# S3 method for SpatRaster
as_task_classif(
x,
target = NULL,
id = deparse(substitute(x)),
positive = NULL,
label = NA_character_,
task_train = NULL,
...
)
Arguments
- x
(any)
Object to convert.- target
(
character(1)
)
Name of the target column.- id
(
character(1)
)
Id for the new task. Defaults to the (deparsed and substituted) name of the data argument.- positive
(
character(1)
)
Level of the positive class. See TaskClassif.- label
(
character(1)
)
Label for the new instance.- task_train
[mlr3::Task]
Task used for training the learner.- ...
(any)
Additional arguments.