## 2 Materials and Methods
### Methodology
#### 2.3.2 Pixel-Based Bi-Long Short-Term Memory (PB-BiLSTM)  
Recurrent neural networks (RNN) are frequently considered a choice for capturing the temporal relationship within time series [45]. However, when the time series data cover an excessively long period, it can result in many model parameters, leading to a slowdown in training speed. Moreover, issues like gradient explosion and disappearance can diminish the information processing capacity of RNN. To solve the phenomenon of \"long-term dependence\" in RNN, the Long Short-Term Memory (LSTM) model came into being [46]. LSTM improves the memory capacity of the model by introducing forget, input, and output gates [47]. When updating the state of a recursive cell, the input gate determines which new input information can be stored. The forget gate determines which information to discard from the current cell, which allows the forgetting gate to control the influence of historical information on the current memory cell state value. The output gate determines which information is available for output [48]. Due to the addition of the gate mechanism, the LSTM model mitigates gradient explosion and disappearance compared to the RNN model [49]. The operation of LSTM is shown below in Equations (1)-(5).  
\[\mathbf{f_{t}} = \sigma(\mathrm{W_{fh}h_{t-1}+W_{fx}X_{t}+b_{f}}) \tag{1}\] \[\mathbf{i_{t}} = \sigma(\mathrm{W_{ih}h_{t-1}+W_{ix}X_{t}+b_{i}})\] (2) \[\mathbf{S_{t}}=\mathbf{f_{t}}\times\mathbf{S_{t-1}}+\mathbf{i_{t }}\times\mathrm{tan}(\mathrm{W_{sh}h_{t-1}+W_{sx}X_{t}+b_{s}})\] (3) \[\mathbf{O_{t}} = \sigma(\mathrm{W_{oh}h_{t-1}+W_{\alpha}X_{t}+b_{o}})\] (4) \[\mathbf{h_{t}}=\mathbf{O_{t}}\times\mathrm{tanh}(\mathbf{S_{t}}) \tag{5}\]  
where \(\mathbf{f_{t}}\), \(\mathbf{i_{t}}\), and \(\mathbf{O_{t}}\) represent the values of \"forget gate\", \"input gate\", and \"output gate\", respectively, \(\mathbf{S_{t}}\) represents the state value of the memory cell, and \(\mathbf{h_{t}}\) represents the value of the hidden layer. \(\sigma\) and \(\mathrm{tanh}\) represent the activation functions sigmoid(x) and \(\mathrm{tanh}(\mathbf{x})\). \(\mathbf{O_{t}}\) represents the entire cell's output value at time \(\mathbf{t}\), \(\mathbf{1}\) represents the current layer, and \(\mathbf{1}-\mathbf{1}\) represents the previous layer.  
LSTM has a problem in the modeling process, namely that it can only capture the data information relationship from front-to-back and not encode the dependency from back-to-front. In some studies, the current output depends not only on the previous state but also on the future state. BiLSTM extracts high-level abstract temporal features from input sequences hierarchically [33].  
The construction process of the PB-BiLSTM model is similar to the PB-Conv1D. The BiLSTM layer is used to extract time-dependent features. To prevent overfitting, each layer of BiLSTM is connected to the Dropout layer, and BatchNormalization is performed to normalize the data after four layers of BiLSTM. Then, partial data is dropped, and the Fully-Connected layer is used to obtain the output results (Figure 6) and the model hyperparameters, as shown in Table 3.