Learn R Programming

blockCV (version 3.1-6)

Spatial and Environmental Blocking for K-Fold and LOO Cross-Validation

Description

Creating spatially or environmentally separated folds for cross-validation to provide a robust error estimation in spatially structured environments; Investigating and visualising the effective range of spatial autocorrelation in continuous raster covariates and point samples to find an initial realistic distance band to separate training and testing datasets spatially described in Valavi, R. et al. (2019) .

Copy Link

Version

Install

install.packages('blockCV')

Monthly Downloads

2,178

Version

3.1-6

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Roozbeh Valavi

Last Published

June 23rd, 2025

Functions in blockCV (3.1-6)

rangeExplorer

Explore spatial block size
spatialAutoRange

Measure spatial autocorrelation in the predictor raster files
buffering

Use distance (buffer) around records to separate train and test folds
cv_plot

Visualising folds created by blockCV in ggplot
cv_block_size

Explore spatial block size
blockCV

blockCV: Spatial and Environmental Blocking for K-Fold and LOO Cross-Validation
cv_cluster

Use environmental or spatial clustering to separate train and test folds
cv_spatial_autocor

Measure spatial autocorrelation in spatial response data or predictor raster files
cv_spatial

Use spatial blocks to separate train and test folds
cv_buffer

Use buffer around records to separate train and test folds (a.k.a. buffered/spatial leave-one-out)
cv_nndm

Use the Nearest Neighbour Distance Matching (NNDM) to separate train and test folds
envBlock

Use environmental clustering to separate train and test folds
foldExplorer

Explore the generated folds
cv_similarity

Compute similarity measures to evaluate possible extrapolation in testing folds
spatialBlock

Use spatial blocks to separate train and test folds