| train.tspred | R Documentation |
tspred objectsFits a model to the time series data contained in a tspred class object
based on a particular model training method. The model training method is defined
by a modeling object contained in the tspred class object.
## S3 method for class 'tspred'
train(obj, ...)
obj |
An object of class |
... |
Ignored |
The function train.tspred calls the method train
on the modeling object for each time series contained in obj.
Finally, the produced time series model is introduced in the structure of the
tspred class object in obj.
If any modeling parameters are computed during training, they are duly updated
in the structure of the tspred class object in obj. This is important
for provenance and reprodutibility of the training process.
An object of class tspred with updated structure containing
the produced trained time series models.
Rebecca Pontes Salles
[tspred()] for defining a particular time series prediction process, and [ARIMA()] for defining a time series modeling and prediction method.
Other train:
train()
data(CATS)
#Obtaining objects of the processing class
proc1 <- subsetting(test_len=20)
proc2 <- BoxCoxT(lambda=NULL)
proc3 <- WT(level=1, filter="bl14")
#Obtaining objects of the modeling class
modl1 <- ARIMA()
#Obtaining objects of the evaluating class
eval1 <- MSE_eval()
#Defining a time series prediction process
tspred_1 <- tspred(subsetting=proc1,
processing=list(BCT=proc2,
WT=proc3),
modeling=modl1,
evaluating=list(MSE=eval1)
)
summary(tspred_1)
tspred_1 <- subset(tspred_1, data=CATS[3])
tspred_1 <- preprocess(tspred_1,prep_test=FALSE)
tspred_1 <- train(tspred_1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.