t_oos: Time-wise holdout

Description Usage Arguments Value

View source: R/methods.R

Description

Performs one holdout experiment.

Usage

1
2
t_oos(data, tr.perc, FUN, form, time = "time", site_id = "site",
  .keepTrain = TRUE, ...)

Arguments

data

full dataset

tr.perc

percentage of data used for training. Remaining will be used for testing

FUN

function with arguments

  • train training set

  • test testing set

  • time column name of time-stamps

  • site_id column name of location identifiers

  • form a formula for model learning

  • ... other arguments

form

a formula for model learning

time

column name of time-stamp in data. Default is "time"

site_id

column name of location identifier in data. Default is "site_id"

.keepTrain

if TRUE (default), instead of the results of FUN being directly returned, a list is created with both the results and a data.frame with the time and site identifiers of the observations used in the training step.

...

other arguments to FUN

Value

The results of FUN. Usually, a data.frame with location identifier site_id, time-stamp time, true values trues and the workflow's predictions preds.


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