modl.dataMining {predtoolsTS} | R Documentation |
Train the data
Description
Train the time serie(as data frame) to build the model.
Usage
modl.dataMining(form, tserieDF, algorithm, timeControl, metric = "RMSE",
maximize = FALSE)
Arguments
form |
A formula of the form y ~ x1 + x2 + ... |
tserieDF |
Data frame. |
algorithm |
A string. Algorithm to perform the training. Full list at http://topepo.github.io/caret/train-models-by-tag.html. Only regression types allowed. |
timeControl |
trainControl object. |
metric |
A string. Specifies what summary metric will be used to select the optimal model. Possible values in |
maximize |
A logical. Should the metric be maximized or minimized? Default is FALSE, since that is what makes sense for time series. |
Value
train object
Author(s)
Alberto Vico Moreno
Examples
modl.dataMining(form=Class ~ .,
tserieDF=modl.tsToDataFrame(AirPassengers,formula=c(1:20)),
algorithm='rpart',
timeControl=modl.trControl(initialWindow=30,horizon=15,fixedWindow=TRUE))
[Package predtoolsTS version 0.1.1 Index]