t_oos: Time-wise holdout

Description Usage Arguments Value

View source: R/methods.R

Description

Performs one holdout experiment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
t_oos(
  data,
  tr.perc,
  FUN,
  form,
  time = "time",
  site_id = "site",
  .keepTrain = TRUE,
  .verbose = FALSE,
  ...
)

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.

.verbose

if TRUE, prints information about progress of the experiment. Default FALSE unless experiment is run in parallel

...

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/STEvaluation-MDPI2021 documentation built on Dec. 21, 2021, 10:07 p.m.