## 2 Data Collection
### Gated Recurrent Unit (GRU)  
Within the domain of neural network architectures, GRU networks emerge as a specialized category of RNNs. Traditional RNNs, while theoretically capable of generating sequences with varied complexities, often encounter practical limitations in recalling data associated with distant past inputs. This impediment significantly undermines their efficacy in modeling long-duration time series, and introduces challenges in sequence stability. An innovative solution to this challenge is presented in the form of networks endowed with extended memory capabilities, offering a stabilizing influence. When such networks encounter difficulties in accurately interpreting recent sequences, they can leverage historical data to enhance and complete their predictive modeling. A prime example of this advanced architecture is the LSTM network. This design, conceived for improved data retention and accessibility, represents an evolution over traditional neural network models [25]. The GRU architecture is frequently regarded as an evolutionary adaptation of the LSTM framework, sharing many fundamental design principles with it. Notably, GRUs are equipped with two pivotal components--the reset gate and the update gate. These gates are instrumental in modulating the internal data flow of the network. Functioning as vector pairs, they are critical in determining the subset of data that progress to the network's output. A key attribute of these gates is their trainable nature, enabling them to consistently maintain the integrity of data from preceding temporal steps, thus ensuring continuity across varied time intervals. The operational essence of a GRU network is encapsulated in a set of core equations, which delineate its fundamental operational mechanics. The following bellow equations serve as the backbone of the GRU's functionality, governing its data processing and predictive capabilities [52]. \[z_{t} =\sigma(W_{xz}\cdot X_{t}+W_{hz}\cdot h_{t-1}+b_{z}) \tag{7}\] \[r_{t} =\sigma(W_{xr}\cdot X_{t}+W_{hr}\cdot h_{t-1}+b_{r})\] (8) \[\hat{h}_{t} =f(W_{xh}\cdot X_{t}+r_{t}\circ(W_{hh}\cdot h_{t-1})+b_{h})\] (9) \[o_{t} =softmax(W_{ho}\cdot h_{t}+b_{0})\] (10) \[o_{t} =softmax(W_{ho}\cdot h_{t}+b_{0}) \tag{11}\]  
In the equations mentioned above, the parameter \(r_{t}\) represents the reset gate, \(z_{t}\) the update gate, \(h_{t}\) the current memory cell, \(h_{t}\) the final memory cell, \(h_{t-1}\) the output level for the previous hidden layer, and \(o_{t}\) the cell output. In these equations, biases are represented by the parameter \(b\), matrix weights by \(W\), and input data by \(X_{t}\). In the above relationships, \(\circ\) symbolizes the element-wise multiplication (Hadamard Product), \(\sigma\) indicates the sigmoid function, and \(f\) is the activation function, which can be either the tanh function or the ReLU function, depending on the application. Based on the above equations, the update gate \(z_{t}\) determines whether the equations at a given time step are based on the previous state of the cell \(h_{t-1}\), the cell input \(X_{t}\), or a combination of both. With this method, the network will be able to easily affect a state from several time steps ago in the subsequent time steps in a long time series or, in other words, the network can retain and use elements from the past in its memory. The additional updating capability in GRU compared to traditional recurrent neural networks has two benefits: Firstly, each cell can remember a specific feature in its input stream for subsequent time steps, and a feature considered important by the update gate can be retained without repetition. Secondly, the network creates new pathways for shortcuts that bypass several time steps. These shortcuts allow the generated error to be easily transmitted in the backpropagation phase without disappearing too quickly, thereby reducing issues related to vanishing gradients [26].