The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Long Short Term Memory (LSTM) Model for Time Series Forecasting
Version: 0.1.0
Author: Dr. Ranjit Kumar Paul [aut, cre], Dr. Md Yeasin [aut]
Maintainer: Dr. Ranjit Kumar Paul <ranjitstat@gmail.com>
Description: The LSTM (Long Short-Term Memory) model is a Recurrent Neural Network (RNN) based architecture that is widely used for time series forecasting. Min-Max transformation has been used for data preparation. Here, we have used one LSTM layer as a simple LSTM model and a Dense layer is used as the output layer. Then, compile the model using the loss function, optimizer and metrics. This package is based on Keras and TensorFlow modules and the algorithm of Paul and Garai (2021) <doi:10.1007/s00500-021-06087-4>.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.1.2
Imports: keras, tensorflow, tsutils, stats
NeedsCompilation: no
Packaged: 2022-01-10 07:16:32 UTC; YEASIN
Repository: CRAN
Date/Publication: 2022-01-13 19:12:41 UTC

Long Short Term Memory (LSTM) Model for Time Series Forecasting

Description

The LSTM (Long Short-Term Memory) model is a Recurrent Neural Network (RNN) based architecture that is widely used for time series forecasting. Min-Max transformation has been used for data preparation. Here, we have used one LSTM layer as a simple LSTM model and a Dense layer is used as the output layer. Then, compile the model using the loss function, optimizer and metrics. This package is based on Keras and TensorFlow modules.

Usage

ts.lstm(
  ts,
  xreg = NULL,
  tsLag,
  xregLag = 0,
  LSTMUnits,
  DropoutRate = 0,
  Epochs = 10,
  CompLoss = "mse",
  CompMetrics = "mae",
  ActivationFn = "tanh",
  SplitRatio = 0.8,
  ValidationSplit = 0.1
)

Arguments

ts

Time series data

xreg

Exogenous variables

tsLag

Lag of time series data

xregLag

Lag of exogenous variables

LSTMUnits

Number of unit in LSTM layer

DropoutRate

Dropout rate

Epochs

Number of epochs

CompLoss

Loss function

CompMetrics

Metrics

ActivationFn

Activation function

SplitRatio

Training and testing data split ratio

ValidationSplit

Validation split ration

Value

References

Paul, R.K. and Garai, S. (2021). Performance comparison of wavelets-based machine learning technique for forecasting agricultural commodity prices, Soft Computing, 25(20), 12857-12873

Examples


y<-rnorm(100,mean=100,sd=50)
x1<-rnorm(100,mean=50,sd=50)
x2<-rnorm(100, mean=50, sd=25)
x<-cbind(x1,x2)
TSLSTM<-ts.lstm(ts=y,xreg = x,tsLag=2,xregLag = 0,LSTMUnits=5, Epochs=2)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.