## 3 Materials and Methods
### 1D-CNN-GRU Architecture
We plugged in \(h_{t-1}\) and \(x_{t}\), multiply with their respective weights, added the results, and applied the Leaky ReLU activation function as before. The mathematical expression of the reset gate is as follows:  
\[r_{t}=\beta(W^{r}x_{t}+U^{r}h_{t-1}) \tag{6}\]  
where \(r_{t}\) is the reset gate at time step \(t\), \(x_{t}\) is the current sample input at time step \(t\), \(W^{r}\) is the weight of the reset gate, \(h_{t-1}\) is the previous hidden state at time step \(t\), and \(U^{r}\) is the weight of the reset gate. To keep important information from the past, new memory content is introduced that replaces the tanh activation function with a Leaky ReLU activation function \(\beta\). This involves multiply the input \(x_{t}\) with a weight \(W\) and \(h_{t-1}\) with a weight \(U\). Furthermore, the element-wise product of reset gate \(r_{t}\) and previous hidden state \(h_{t-1}\) are calculated. This decides which time steps should be removed from the preceding ones. The mathematical expression is as follows:  
\[h_{t}=\beta(Wx_{t}+r_{t}\odot Ulh_{t-1}) \tag{7}\]  
where \(h_{t}\) is the current memory at time step \(t\), \(x_{t}\) is the current sample input at time step \(t\), \(W\) is the weight of networks, \(h_{t-1}\) is the previous hidden state at time step \(t\), and \(U\) is the weight of the previous hidden state. The update gate is necessary to retrieve the current final memory. It decides what to gather from the present memory content \(h_{t}\) and past stages \((h_{t-1})\). This is accomplished by multiplying the update gate \((z_{t})\) and \((h_{t-1})\) element-by-element and multiplying \((1-z_{t})\) and \(h_{t}\) element-by-element. After this, the two are added together. The mathematical expression is as follows:  
\[h_{t}=z_{t}\odot h_{t-1}+(1-z_{t})\odot h_{t} \tag{8}\]  
where \(h_{t}\) is the current memory at time step \(t\), and \(h_{t-1}\) is the previous hidden state at time step \(t\). Layer 6 receives a matrix input from the GRU layer, which has 128 neurons, and a dropout layer is employed to reduce overfitting using a dropout of 0.2. At the end of each cycle, the dropout picks a few nodes at random and eliminates them, together with all of their incoming and outgoing connections. The mathematical expression of the dropout layer can be expressed as:  
\[d=\sum_{i=1}^{n}w_{i}\delta_{i}x_{i} \tag{9}\]  
where \(\delta_{i}\) is the Bernoulli random variable that deletes the weight \(w_{i}\) with a probability between 0 and 1. After using the dropout layer, the GRU layer was considered in layer 7 by feeding the layer with 1 \(\times\) 128 vector and using the step described in layer 5 with the addition of a kernel initializer set to random uniform with a seed of 42. Layer 8 also uses the dropout layer to prevent the network from overfitting. In layer 9, a flatten layer is used to reduce the input data to a single dimension. The single dimension from the flatten layer is input into the fully connected layer 10 with 512 nodes, and the leaky ReLU activation function is used in all the remaining activation functions. Layer 11 is made up of 256 nodes and is fully linked. Data is supplied into the final fully connected layers with a linear activation function, after passing through Layer 11 for the final prediction.