Skip to contents

Convert object to a TaskRegr.

Usage

# S3 method for sf
as_task_regr(
  x,
  target = NULL,
  id = deparse(substitute(x)),
  label = NA_character_,
  task_train = NULL,
  ...
)

# S3 method for stars
as_task_regr(
  x,
  target = NULL,
  id = deparse(substitute(x)),
  label = NA_character_,
  task_train = NULL,
  ...
)

# S3 method for SpatRaster
as_task_regr(
  x,
  target = NULL,
  id = deparse(substitute(x)),
  label = NA_character_,
  task_train = NULL,
  ...
)

# S3 method for RasterBrick
as_task_regr(
  x,
  target = NULL,
  id = deparse(substitute(x)),
  label = NA_character_,
  task_train = NULL,
  ...
)

# S3 method for Raster
as_task_regr(
  x,
  target = NULL,
  id = deparse(substitute(x)),
  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.

label

(character(1))
Label for the new instance.

task_train

[mlr3::Task]
Task used for training the learner.

...

(any)
Additional arguments.

Value

TaskRegr.