## 3 Materials and Methods
### Model Training
#### 3.2.1 Lstm-RNN  
An ANN is a computing system inspired by biological neural processing research. The model consists of interconnected processing nodes, or neurons, that work together to solve complex problems. During training, the connections between nodes have their weights adjusted. A typical ANN, called a multiple-layer perceptron network, includes three layers: input, hidden, and output [47]. This is illustrated in Figure 3, and the formulas for these layers are expressed in Equations (2) and (3). \[y_{t}=G_{so}(W_{is}s_{t}+b_{0}) \tag{2}\]  
\[s_{t}=G_{is}(W_{is}x_{t}+b_{1}) \tag{3}\]  
where \(G_{so}\) and \(G_{is}\) represent the activation functions for the hidden-to-output and input-to-hidden layers, respectively. The weight parameters are represented by matrices \(W_{so}\) and \(W_{is}\), and biases for each layer are indicated by \(b_{0}\) and \(b_{1}\). The hidden state vector at step \(t\) is represented by the variable \(s_{t}\). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Combination Number** & **Input Sequence** & **Output** \\ \hline
1 & Hi-Di-To & \\
2 & Hi-Ho-To & \\
3 & Hi-To-Rs & \\
4 & Di-Rs-To & \\
5 & Ho-To-Rs & Ti \\
6 & Hi-Di-Rs & \\
7 & Hi-Di-Ho & \\
8 & Hi-Rs-Ho & \\
9 & Di-Rs-Ho & \\
10 & Di-Ho-To & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sequence of input–output variables (many-to-one). RNNs differ from traditional neural networks in that they use feedback loops. This means that the output from each layer is sent back to the RNN to influence the current stage's results. RNNs are effective in classification analysis and working with time series data, allowing for nonlinear trajectory prediction and dynamic system modeling. These networks are frequently selected for processing sequential data. Figure 4 depicts an RNN network temporarily deployed to represent an element of the modeling string. The hidden state vector for RNNs in Equation (3) can be adjusted according to Equation (4):  
\[s_{t}=G_{is}(W_{is}x_{t}+W_{s}s_{t-1}+b_{1}) \tag{4}\]  
where \(W_{s}\) is the matrix of weight parameter for the prior hidden state. RNNs have different aspects, with LSTM being the most commonly used for time series forecasting. LSTM includes memory cells with three types of gates: input, output, and forget gates. The input gate regulates the flow into the memory cell of input activations, while the output gate regulates the yield flow to the rest of the network of cell activations. The forget gate scales the cell's inner state before adding it to the cell as input through the cell's self-recurring association, thus forgetting or resetting the cell's memory adaptively. The memory cell is the key to the LSTM framework, as it goes directly down the entire chain with the capacity to add or extract cell state information, tightly controlled by structures called gates. These gates are optional data inlet ways consisting of a neural net layer sigmoid and point-sensitive multiplication [47], as shown in Figure 5.  
The first step in LSTM is determining which data will be removed from the cell state. This decision is made by the forget gate \((f_{t})\), as shown in Equation (5):  
\[f_{t}=\sigma(W_{fx}x_{t}+W_{fs}s_{t-1}+b_{f}) \tag{5}\]  
where \(\sigma\) is the sigmoid function. The next step is determining what new information should be saved in the cell's state by two actions. The first is the input gate \((i_{t})\) selecting which  
Figure 4: Structural overview of RNN. Figure 3: Structural overview of ANN. data to modify, as expressed in Equation (6).