as_task function

Convert to a Task

Convert to a Task

Convert object to a Task or a list of Task . This method e.g. allows to convert an mlr3oml::OMLTask to a Task and additionally supports cloning. In order to construct a Task from a data.frame, use task-specific converters such as as_task_classif() or as_task_regr().

as_task(x, ...) ## S3 method for class 'Task' as_task(x, clone = FALSE, ...) as_tasks(x, ...) ## Default S3 method: as_tasks(x, ...) ## S3 method for class 'list' as_tasks(x, ...)

Arguments

  • x: (any)

    Object to convert.

  • ...: (any)

    Additional arguments.

  • clone: (logical(1))

    If TRUE, ensures that the returned object is not the same as the input x.