Description Usage Arguments Value
Performs a cross-validation experiment where folds can be allocated in different ways considering time and/or space and a certain buffer around the testing set time and/or space is removed from the training set.
1 2 3 4 |
data |
full dataset |
nfolds |
number of folds for the data set to be separated into. |
FUN |
function with arguments
|
form |
a formula for model learning |
fold.alloc.proc |
name of fold allocation function. Should be one of
|
alloc.pars |
parameters to pass onto |
t.buffer |
numeric value with the distance of the temporal buffer between
training and test sets. For each instance in the test set, instances that have
a temporal distance of |
s.buffer |
numeric value with the maximum distance of the spatial buffer between
training and test sets. For each instance in the test set, instances that have
a spatial distance of |
s.dists |
a matrix of the distances between the spatial IDs in |
t.dists |
a matrix of the distances between the time-stamps in |
time |
column name of time-stamp in |
site_id |
column name of location identifier in |
.keepTrain |
if TRUE (default), instead of the results of
|
... |
other arguments to FUN |
If keepTrain
is TRUE
, a list where each slot
corresponds to one repetition or fold, containing a list with
slots results
containing the results of FUN
, and
train
containing a data.frame with the time
and
site_id
identifiers of the observations used in the training
step. Usually, the results of FUN
is a data.frame
with location identifier site_id
, time-stamp time
,
true values trues
and the workflow's predictions
preds
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.