## 2 Research Methodology
### LSTM Model  
The Long Short-Term Memory (LSTM) Model is a type of recurrent neural network designed to process sequential data such as time series or sentences [12]. It addresses the issues of vanishing and exploding gradients while effectively capturing long-term dependencies. The LSTM model consists of a cell, an input gate, a forget gate, and an output gate. Each gate produces values between 0 and 1 using the sigmoid function to determine which information to retain and which to discard. The input gate decides how much information to remember based on the current time step's input and the previous time step's hidden state. The activation calculation for the input gate, as shown in Equation (5), is as follows:  
\[i(t)=\sigma(Wi\cdot[h(t-1),x(t)]+b_{i}) \tag{5}\]  
here, \(i(t)\) represents the activation value of the input gate, \  
here, \(f(t)\) represents the activation value of the forget gate, \(W_{f}\) denotes the weight matrix for the inputs, and bf represents the bias vector of the forget gate. The cell state is updated by combining the preserved information from the previous time step's cell state with the selected candidate values through the input gate. The cell state plays a crucial role in storing important information with long-term significance. Updating the cell state involves determining how much information to preserve from the previous cell state, as shown in Equation (7).  
\[C(t)=f(t)\odot C(t-1)+i(t)\odot g(t) \tag{7}\]  
here, \(C(t)\) represents the cell state at the current time step, \(\odot\) denotes element-wise multiplication, and \(g(t)\) performs the calculation of the candidate value for the cell at the current time step as described in Equation (8).  
\[g(t)=tanh(Wc\cdot[h(t-1),x(t)]+bc) \tag{8}\]  
The output gate determines what information to output based on the current time step's input and the previous time step's hidden state. Equation (9) calculates the activation value of the output gate:  
\[o(t)=\sigma(Wo\cdot[h(t-1),x(t)]+bo) \tag{9}\]  
here, \(o(t)\) represents the activation value of the output gate. _Wo_ represents the weight matrix for the input, and _bo_ represents the bias vector for the output gate. By multiplying the activation value of the output gate with the cell state, we obtain the final hidden state, which is then passed through the hyperbolic tangent function. Equation (10) calculates the hidden state (output) at the current time step.  
\[h(t)=o(t)\odot tanh(C(t)) \tag{10}\]  
here, \(h(t)\) represents the current time step's hidden state (output of the current memory cell), \(\odot\) denotes element-wise multiplication, and \(tanh\) refers to the hyperbolic tangent activation function. These equations constitute the fundamental formulas and equations used in LSTM models. LSTM overcomes the limitations of traditional RNNs, such as the vanishing and exploding gradient problems, allowing it to capture long-term dependencies in time series data. It updates the input, output, cell state, and hidden state while preserving information and selectively providing relevant information. LSTM models process input sequences one step at a time, updating the cell state and hidden state at each step. This enables the capture of long-term dependencies and the learning of sequential patterns in data. LSTM is widely used in tasks such as time series prediction, machine translation, and natural language processing, and it serves as a critical component in deep learning.