modl.dataMining {predtoolsTS} | R Documentation |
Train the time serie(as data frame) to build the model.
modl.dataMining(form, tserieDF, algorithm, timeControl, metric = "RMSE",
maximize = FALSE)
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. |
train object
Alberto Vico Moreno
modl.dataMining(form=Class ~ .,
tserieDF=modl.tsToDataFrame(AirPassengers,formula=c(1:20)),
algorithm='rpart',
timeControl=modl.trControl(initialWindow=30,horizon=15,fixedWindow=TRUE))