Skip to contents

mlr3spatiotempcv

mlr3spatiotempcv mlr3spatiotempcv-package
mlr3spatiotempcv: Spatiotemporal Resampling Methods for 'mlr3'

Spatiotemporal Blocking Methods

These methods use square/rectangular blocks for partitioning.

mlr_resamplings_spcv_block ResamplingSpCVBlock
(blockCV) Spatial block resampling
mlr_resamplings_repeated_spcv_block ResamplingRepeatedSpCVBlock
(blockCV) Repeated spatial block resampling
mlr_resamplings_spcv_tiles ResamplingSpCVTiles
(sperrorest) Spatial "Tiles" resampling
mlr_resamplings_repeated_spcv_tiles ResamplingRepeatedSpCVTiles
(sperrorest) Repeated spatial "tiles" resampling

Spatiotemporal Buffering Methods

These methods support using buffering zones which eventually remove observations between train and test sets.

mlr_resamplings_spcv_buffer ResamplingSpCVBuffer
(blockCV) Spatial buffering resampling
mlr_resamplings_spcv_disc ResamplingSpCVDisc
(sperrorest) Spatial "disc" resampling
mlr_resamplings_repeated_spcv_disc ResamplingRepeatedSpCVDisc
(sperrorest) Repeated spatial "disc" resampling
mlr_resamplings_sptcv_cstf ResamplingSptCVCstf
(CAST) Spatiotemporal "Leave-location-and-time-out" resampling
mlr_resamplings_repeated_sptcv_cstf ResamplingRepeatedSptCVCstf
(CAST) Repeated spatiotemporal "leave-location-and-time-out" resampling

Spatiotemporal Clustering Methods

These methods make use of clustering methods (e.g. k-means) to create (equally-sized) partitions.

mlr_resamplings_spcv_coords ResamplingSpCVCoords
(sperrorest) Coordinate-based k-means clustering
mlr_resamplings_repeated_spcv_coords ResamplingRepeatedSpCVCoords
(sperrorest) Repeated coordinate-based k-means clustering
mlr_resamplings_spcv_disc ResamplingSpCVDisc
(sperrorest) Spatial "disc" resampling
mlr_resamplings_repeated_spcv_disc ResamplingRepeatedSpCVDisc
(sperrorest) Repeated spatial "disc" resampling
mlr_resamplings_spcv_knndm ResamplingSpCVKnndm
(CAST) K-fold Nearest Neighbour Distance Matching
mlr_resamplings_repeated_spcv_knndm ResamplingRepeatedSpCVKnndm
(CAST) Repeated K-fold Nearest Neighbour Distance Matching

Feature Space Clustering Methods

These methods cluster in the feature space and not (necessarily) in space or time.

mlr_resamplings_spcv_env ResamplingSpCVEnv
(blockCV) "Environmental blocking" resampling
mlr_resamplings_repeated_spcv_env ResamplingRepeatedSpCVEnv
(blockCV) Repeated "environmental blocking" resampling

Group-level Partitioning Methods

These methods use (multiple) factor-variables / inherited grouping to create partitions.

mlr_resamplings_sptcv_cstf ResamplingSptCVCstf
(CAST) Spatiotemporal "Leave-location-and-time-out" resampling
mlr_resamplings_repeated_sptcv_cstf ResamplingRepeatedSptCVCstf
(CAST) Repeated spatiotemporal "leave-location-and-time-out" resampling

Spatiotemporal Tasks

Classification and regression tasks.

TaskRegrST
Create a Spatiotemporal Regression Task
as_task_regr_st()
Convert to a Spatiotemporal Regression Task
TaskClassifST
Create a Spatiotemporal Classification Task
as_task_classif_st()
Convert to a Spatiotemporal Classification Task

Spatiotemporal Example Datasets

Tasks appended to the mlr_tasks dictionary.

cookfarm_mlr3
Cookfarm Profiles Regression Task
diplodia
Diplodia Classification Task
ecuador
Ecuador Classification Task

Visualization of spatiotemporal partitions

autoplot(<ResamplingCV>) autoplot(<ResamplingRepeatedCV>) plot(<ResamplingCV>) plot(<ResamplingRepeatedCV>)
Visualization Functions for Non-Spatial CV Methods.
autoplot(<ResamplingCustomCV>) plot(<ResamplingCustomCV>)
Visualization Functions for Non-Spatial CV Methods.
autoplot(<ResamplingSpCVBlock>) autoplot(<ResamplingRepeatedSpCVBlock>) plot(<ResamplingSpCVBlock>) plot(<ResamplingRepeatedSpCVBlock>)
Visualization Functions for SpCV Block Methods.
autoplot(<ResamplingSpCVBuffer>) plot(<ResamplingSpCVBuffer>)
Visualization Functions for SpCV Buffer Methods.
autoplot(<ResamplingSpCVCoords>) autoplot(<ResamplingRepeatedSpCVCoords>) plot(<ResamplingSpCVCoords>) plot(<ResamplingRepeatedSpCVCoords>)
Visualization Functions for SpCV Coords Methods.
autoplot(<ResamplingSpCVDisc>) autoplot(<ResamplingRepeatedSpCVDisc>) plot(<ResamplingSpCVDisc>) plot(<ResamplingRepeatedSpCVDisc>)
Visualization Functions for SpCV Disc Method.
autoplot(<ResamplingSpCVEnv>) autoplot(<ResamplingRepeatedSpCVEnv>) plot(<ResamplingSpCVEnv>) plot(<ResamplingRepeatedSpCVEnv>)
Visualization Functions for SpCV Env Methods.
autoplot(<ResamplingSpCVKnndm>) autoplot(<ResamplingRepeatedSpCVKnndm>) plot(<ResamplingSpCVKnndm>) plot(<ResamplingRepeatedSpCVKnndm>)
Visualization Functions for SpCV knndm Method.
autoplot(<ResamplingSpCVTiles>) autoplot(<ResamplingRepeatedSpCVTiles>) plot(<ResamplingSpCVTiles>) plot(<ResamplingRepeatedSpCVTiles>)
Visualization Functions for SpCV Tiles Method.
autoplot(<ResamplingSptCVCstf>) autoplot(<ResamplingRepeatedSptCVCstf>) plot(<ResamplingSptCVCstf>) plot(<ResamplingRepeatedSptCVCstf>)
Visualization Functions for SptCV Cstf Methods.