train: Training a time series model

Description Usage Arguments Value Author(s) See Also Examples

View source: R/modeling.r

Description

train is a generic function for training a time series model based on a particular training function defined in a modeling object. The function invokes particular methods which depend on the class of the first argument.

Usage

1
2
3
4
5
6
7
train(obj, ...)

## S3 method for class 'MLM'
train(obj, data, ...)

## S3 method for class 'linear'
train(obj, data, ...)

Arguments

obj

An object of class modeling defining a particular model.

...

Other parameters passed to train_func of obj.

For train.MLM, sw of obj may be used to transform the time series in data into sliding windows used during training. Also, proc of obj may be used to preprocess the time series before training.

data

A list of time series to be modelled.

Value

A list containing obj and the trained models.

Author(s)

Rebecca Pontes Salles

See Also

Other train: train.tspred()

Examples

1
2
3
4
5
6
7
data(CATS,CATS.cont)

a <- ARIMA()
model <- train(a,list(CATS[,1]))

n <- NNET(size=5, sw=SW(window_len = 5+1), proc=list(MM=MinMax()))
model <- train(n,list(CATS[,1]))

TSPred documentation built on Jan. 21, 2021, 5:10 p.m.