sp_checker: Assign the locations of a regular grid to folds following a...

Description Usage Arguments Value

View source: R/utils.R

Description

Systematically assigns the locations of a data frame into folds which are checkered across space for cross-validation. Assumes the sites are sorted (e.g., left to right, bottom to top).

Usage

1
2
sp_checker(nfolds, nsites, grid.h = sqrt(nsites),
  grid.w = sqrt(nsites))

Arguments

nfolds

number of folds to divide the space into

nsites

number of locations in the regular grid

grid.h

height of the grid (in number of sites). Default is sqrt(nfolds)

grid.w

width of the grid (in number of sites). Default is sqrt(nfolds)

Value

a vector with the fold assignment of each location


mrfoliveira/Evaluation-procedures-for-forecasting-with-spatio-temporal-data documentation built on April 11, 2021, 10:50 a.m.