## 3 Materials and Methods
### Long Short-Term Memory (LSTM) Model  
Long Short-Term Memory (LSTM) is a recurrent neural network architecture designed specifically for working with time series and sequential data [28]. The fundamental feature of LSTM is its ability to learn long-term dependencies, allowing it to understand and utilize long-term dependencies without losing short-term memory capabilities. The basic structure of the LSTM architecture is provided in Figure 4.  
The Hidden State (H\({}_{\text{t}}\)) and Cell State Update (C\({}_{\text{t}}\)) indicate how the LSTM model progresses from one-time step to the next and updates the information it contains. These two components enhance the model's learning and information retention capabilities by updating the hidden state, representing the network's previous state, and the memory cell. While H\({}_{\text{t}}\) typically represents the outputs presented by the model to the external world, C\({}_{\text{t}}\) signifies the internal memory state of the model. These two states empower the LSTM to learn long-term dependencies.  
The hidden state update involves the following steps:  
Output Gate (O\({}_{\text{t}}\)): This utilizes a sigmoid activation function to determine the amount of information to extract from the cell state. This controls if more or less information is extracted from the cell state. The O\({}_{\text{t}}\) value is a number between 0 and 1.  
Cell State (C\({}_{\text{t}}\)): This represents the updated cell state from the LSTM's memory unit.  
Hidden State Update (H\({}_{\text{t}}\)): This is updated using the formula in Equation (4).  
\[\text{H}_{\text{t}}=\text{O}_{\text{t}}\text{tanh}(\text{C}_{\text{t}}) \tag{4}\]  
In this formula, the hyperbolic tangent (tanh) activation function compresses the cell state value into the range \([-1,1]\). Afterward, the result is multiplied by the ratio determined by the output gate. This process determines how the information learned by the LSTM will be reflected in the vector representing the hidden state.  
The Cell State Update (C\({}_{\text{t}}\)) involves the following steps:  
Forget Gate (f\({}_{\text{t}}\)): A sigmoid activation function is used to determine which information from the previous cell state will be forgotten. Values approaching 0 imply complete forgetting, while values approaching 1 indicate complete remembrance.  
Input Gate (I\({}_{\text{t}}\)): A sigmoid activation function is used to determine how much of the new information will be added to the cell state. Values approaching 0 imply ignoring the new information, while values approaching 1 indicate fully incorporating the new information.  
Candidate Memory (\(\widetilde{\text{C}}_{\text{t}}\)): This represents the candidate cell state, which represents the new information. It is processed using the tanh activation function and compressed into values between -1 and 1.  
Cell State Update (C\({}_{\text{t}}\)): It represents the result obtained by subtracting the forgotten part from the previous cell state using the forget gate and adding the new information using the input gate. Mathematically, it is expressed as in Equation (5).  
\[\text{C}_{\text{t}}=\text{f}_{\text{t}}\text{C}_{\text{t}-1}+\text{I}_{\text{ t}}\widetilde{\text{C}}_{\text{t}} \tag{5}\]