modl.trControl {predtoolsTS} | R Documentation |
Creates the needed caret::trainControl
object to control the training
splitting.
modl.trControl(initialWindow, horizon, fixedWindow, givenSummary = FALSE)
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 |
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.
trainControl object
Alberto Vico Moreno
modl.trControl(initialWindow=30,horizon=15,fixedWindow=TRUE,givenSummary=TRUE)