Methodology
Hochreiter and Schmidhuber introduced the Long Short Term Memory (LSTM) neural network in 1997 to include the benefits of addressing long-term data dependencies. Because of these characteristics, the LSTM model was very practical for financial high-frequency time series data. LSTM model is developed to solve the problems of recurrent neural network (RNN) models, gradient expansion, and gradient disappearance. LSTM model has three memory modules: input gate, output gate and forget gate. The main functions of these three gates are retaining important information and discarding irrelevant information from the units. The LSTM network has been modified and simplified as “TS-LSTM” model for agricultural time series forecasting.
Function Used
ts.lstm(
ts,
tsLag = 2,
xregLag = 0,
Epochs = 5,
SplitRatio = 0.8
)
Arguments
ts: Time series data
tsLag: Lag of time series data
LSTMUnits: Number of unit in LSTM layer
Epochs: Number of epochs
SplitRatio: Training and testing data split ratio