RNN - Recurrent Neural Network
An RNN used for time series forecasting is a Machine Learning model, and more specifically, it is a type of Deep Learning model. RNNs are a class of neural networks well-suited for time series forecasting, especially when dealing with sequential data where previous values influence future ones.
🔁How RNN Works for Time Series Forecasting
-
Sequential Processing: Unlike feedforward neural nets, RNNs have loops that allow information to persist, making them ideal for temporal patterns.
-
Memory of Past Inputs: RNNs maintain a hidden state that gets updated as new inputs arrive—ideal for learning trends and seasonality in time series.
-
Prediction Strategy:
-
One-to-One: Predict the next value.
-
Many-to-One: Use a sequence of values to predict one output.
-
Many-to-Many: Sequence in, sequence out (like stock price forecast over the next week).
-
RNN Model Parameters
Param Name | Description | Param Value (Default) |
---|---|---|
RNN-TYPE |
Type of RNN architecture used (e.g., LSTM, GRU, RNN). | LSTM |
HIDDEN-DIM |
Number of hidden units in each RNN layer. | 124 |
RNN-LAYERS |
Number of stacked RNN layers in the model. | 2 |
DROPOUT |
Dropout rate applied between RNN layers to prevent overfitting. | 0.0 |
EPOCHS |
Total number of times the model trains on the dataset. | 100 |
LEARNING-RATE |
Learning rate used by the optimizer for training. | 0.001 |
BATCH-SIZE |
Number of training samples per batch. | 32 |
RANDOM-STATE |
Seed value for reproducibility of model training. | 42 |
FORCE-RESET |
Whether to reset hidden states between sequences (for stateful RNNs). | True |