This task specializes TaskRegr for spatiotemporal regression problems.
A spatial example task is available via tsk("cookfarm_mlr3")
.
The coordinate reference system passed during initialization must match the one which was used during data creation, otherwise offsets of multiple meters may occur.
By default, coordinates are not used as features.
This can be changed by setting coords_as_features = TRUE
.
Super classes
mlr3::Task
-> mlr3::TaskSupervised
-> mlr3::TaskRegr
-> TaskRegrST
Active bindings
crs
(
character(1)
)
Returns coordinate reference system of the task.coordinate_names
(
character()
)
Returns coordinate names.coords_as_features
(
logical(1)
)
IfTRUE
, coordinates are used as features.
Methods
Inherited methods
mlr3::Task$add_strata()
mlr3::Task$cbind()
mlr3::Task$data()
mlr3::Task$droplevels()
mlr3::Task$filter()
mlr3::Task$format()
mlr3::Task$formula()
mlr3::Task$head()
mlr3::Task$help()
mlr3::Task$levels()
mlr3::Task$missings()
mlr3::Task$rbind()
mlr3::Task$rename()
mlr3::Task$select()
mlr3::Task$set_col_roles()
mlr3::Task$set_levels()
mlr3::Task$set_row_roles()
mlr3::TaskRegr$truth()
Method new()
Creates a new instance of this R6 class.
The function as_task_regr_st()
provides an alternative way to construct classification tasks.
Usage
TaskRegrST$new(
id,
backend,
target,
label = NA_character_,
coordinate_names,
crs = NA_character_,
coords_as_features = FALSE,
extra_args = list()
)
Arguments
id
(
character(1)
)
Identifier for the new instance.backend
(DataBackend)
Either a DataBackend, or any object which is convertible to a DataBackend withas_data_backend()
. E.g., amsf
will be converted to a DataBackendDataTable.target
(
character(1)
)
Name of the target column.label
(
character(1)
)
Label for the new instance.coordinate_names
(
character(1)
)
The column names of the coordinates in the data.crs
(
character(1)
)
Coordinate reference system. WKT2 or EPSG string.coords_as_features
(
logical(1)
)
IfTRUE
, coordinates are used as features.extra_args
(named
list()
)
Named list of constructor arguments, required for converting task types viaconvert_task()
.
Method coordinates()
Returns coordinates of observations.
Arguments
row_ids
(
integer()
)
Vector of rows indices as subset oftask$row_ids
.
Method print()
Print the task.