Create a Spatiotemporal Regression Task
This task specializes mlr3::Task and mlr3::TaskSupervised for spatiotemporal classification problems.
A spatial example task is available via tsk("ecuador")
, a spatiotemporal one 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
.
Other Task: TaskClassifST
, mlr_tasks_cookfarm_mlr3
, mlr_tasks_diplodia
, mlr_tasks_ecuador
mlr3::Task
-> mlr3::TaskSupervised
-> mlr3::TaskRegr
-> TaskRegrST
crs
: (character(1)
)
Returns coordinate reference system of task.
coordinate_names
: (character()
)
Coordinate names.
coords_as_features
: (logical(1)
)
If `TRUE`, coordinates are used as features. This is a shortcut for `task$set_col_roles(c("x", "y"), role = "feature")` with the assumption that the coordinates in the data are named `"x"` and `"y"`.
new()
Create a new spatiotemporal resampling Task Returns coordinates of observations.
TaskRegrST$new(
id,
backend,
target,
label = NA_character_,
coordinate_names,
crs = NA_character_,
coords_as_features = FALSE,
extra_args = list()
)
id
: (character(1)
)
Identifier for the new instance.
backend
: (mlr3::DataBackend )
Either a mlr3::DataBackend , or any object which is convertible to a mlr3::DataBackend with `as_data_backend()`. E.g., am `sf` will be converted to a mlr3::DataBackendDataTable .
target
: (character(1)
)
Name of the target column.
label
: (character(1)
)
Label for the new instance. Shown in `as.data.table(mlr_tasks)`.
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)
)
If `TRUE`, coordinates are used as features. This is a shortcut for `task$set_col_roles(c("x", "y"), role = "feature")` with the assumption that the coordinates in the data are named `"x"` and `"y"`.
extra_args
: (named list()
)
Named list of constructor arguments, required for converting task types via `mlr3::convert_task()`.
coordinates()
TaskRegrST$coordinates(row_ids = NULL)
row_ids
: (integer()
)
Vector of rows indices as subset of `task$row_ids`.
data.table::data.table()
print()
Print the task.
TaskRegrST$print(...)
...
: Arguments passed to the $print()
method of the superclass.
clone()
The objects of this class are cloneable with this method.
TaskRegrST$clone(deep = FALSE)
deep
: Whether to make a deep clone.
Useful links