ARMA.LSTM {ARMALSTM}R Documentation

Hybrid ARMA-LSTM Model for Time Series Forecasting

Description

The linear ARMA model is fitted to the time series. The significant number of PACF values of ARMA residuals are considered as the lag. The LSTM model is fitted to the ARMA residuals setting the lag value as the time step. User needs to install keras, tensorflow and reticulate packages as the prerequisite to implement this package.

Usage

ARMA.LSTM(X, p, q, arfima = FALSE, dist.model= "ged", out.sample, LSTM.units,
ACTIVATION.function = "tanh", DROPOUT = 0.2, Optimizer ="adam", Epochs = 100,
LSTM.loss = "mse", LSTM.metrics = "mae")

Arguments

X

A univariate time series data

p

Order of AR

q

Order of MA

arfima

Whether to include arfima (0<d<0.5)

dist.model

The distribution density to use for the innovation. The default distribution for the mean model used is "ged". Other choices can be obtained from the rugarch package.

out.sample

A positive integer indicating the number of periods before the last to keep for out of sample forecasting. To be considered as test data.

LSTM.units

Number of units in the LSTM layer

ACTIVATION.function

Activation function

DROPOUT

Dropout rate

Optimizer

Optimizer used for optimization of the LSTM model

Epochs

Number of epochs of the LSTM model

LSTM.loss

Loss function

LSTM.metrics

Metrics

Value

References

Examples


y<-c(5,9,1,6,4,9,7,3,5,6,1,8,6,7,3,8,6,4,7,5)
my.hybrid<-ARMA.LSTM(y, p=1, q=0, arfima=FALSE, dist.model = "ged",
out.sample=10, LSTM.units=50, ACTIVATION.function = "tanh",
DROPOUT = 0.2, Optimizer ="adam", Epochs = 10, LSTM.loss = "mse", LSTM.metrics = "mae")


[Package ARMALSTM version 0.1.0 Index]