modl.trControl: Control the splitting to train the data

Description Usage Arguments Details Value Author(s) Examples

Description

Creates the needed caret::trainControl object to control the training splitting.

Usage

1
modl.trControl(initialWindow, horizon, fixedWindow, givenSummary = FALSE)

Arguments

initialWindow

An integer. The initial number of consecutive values in each training set sample. Default value: 30.

horizon

An integer. The number of consecutive values in test set sample. Default value: 15.

fixedWindow

A logical: if FALSE, the training set always start at the first sample and the training set size will vary over data splits. Default value: TRUE.

givenSummary

A logical. Indicates if it should be used the customized summaryFunction(?trainControl for more info) modl.sumFunction or not. Default is FALSE; this will use default caret metrics.

Details

We always split using method "timeslice", wich is the better for time series. More information on how this works on http://topepo.github.io/caret/data-splitting.html#data-splitting-for-time-series.

Value

trainControl object

Author(s)

Alberto Vico Moreno

Examples

1
modl.trControl(initialWindow=30,horizon=15,fixedWindow=TRUE,givenSummary=TRUE)

avm00016/predtoolsTS documentation built on May 7, 2019, 10:56 a.m.