| Spatial k-folds | R Documentation |
Spatial k-folds.
spat.folds(coords, nfolds = 10, size = 1000)
coords |
A matrix with the coordinates of the locations. The first column is the latitude and the second is the longitude. |
nfolds |
The number of spatial folds to create. |
size |
A numeric value of the specified range by which blocks are created and training/testing data are separated. This distance should be in metres. If you have big regions you should consider increasing this number. For more information see the package blockCV. |
Folds of data are created based on their coordinates. For more information see the package blockCV.
A list with nfolds elements. Each elements contains a list with two elements, the first is the indices of the training set and the second contains the indices of the test set.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
cv.alfaslx, me.aslx, gwar, alfa.reg
data(fadn)
coords <- fadn[1:100, 1:2]
folds <- spat.folds(coords, nfolds = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.