## 2 Materials and Methods
### The Proposed Base CNN Architecture  
In this paper, we first created a base CNN topology before performing hyperparameter optimization. Our proposed 1D-CNN has 2 main blocks (2 convolutional, 2 batch normalization, and 2 max-pooling layers), and a classification block (4 dense and 3 dropout layers). The architecture of the proposed base CNN approach is depicted in Figure 3.  
In each convolution layer, we used 64 convolution filters, 3 filter sizes, and 1 time step. As a fuzzy filter, convolution layers improve the features of original signals and eliminate noise. A convolution operation takes place between the upper layer's feature vectors and the current layer's convolution filter. Finally, the activation function returns the outcomes of convolution calculations. Equation (1) shows the outcome of the convolution layer:  
\[X_{j}^{l}=f(\sum_{i\in M_{j}}X_{j}^{l-1}\times W_{ij}^{l}+b_{j}^{l}) \tag{1}\]  
where \(M_{j}\) denotes the current neuron's receptive field. \(X_{j}^{l}\) represents the characteristic vector for the \(l\)th layer's \(j\)th convolution filter. \(f\) means a nonlinear function. \(W_{ij}^{l}\) represents the bias coefficient assigned to the \(l\)th layer's \(j\)th convolution kernel.  
We utilized Batch Normalization [32] after each convolutional layer to enhance performance results and accelerate training convergence. It is accomplished by normalizing each feature at the batch level during training and then re-scaling later with the entire training data in mind. Each mini-batch's dimension is transformed as shown in Equation (2), where \(Var\Big{[}x^{(k)}\Big{]}\) and \(E\Big{[}x^{(k)}\Big{]}\) represent the variance and the mean of \(k\)th scalar feature, respectively. The numerical stability is improved by a minor constant \(\epsilon\).  
\[\hat{x}^{(k)}=\frac{x^{(k)}-E\Big{[}x^{(k)}\Big{]}}{\sqrt{Var\left[x^{(k)} \right]+\epsilon}} \tag{2}\]  
Figure 3: The topology of our CNN approach. BN: Batch Normalization; Conv1D: Convolutional layer one-dimensional.  
The learnable parameters \(\beta\) and \(\gamma\) are introduced through Batch Normalization. The transformation of each layer is described in Equation (3).  
\[BatchNormalization\Big{(}x^{(k)}\Big{)}=\gamma^{(k)}\times\hat{x}^{(k)}+\beta^{(k)} \tag{3}\]  
Pooling is a sublayer of a CNN that introduces non-linearity by amalgamating nearby values' feature into one, using a specific operator. The most common options are average-pooling and max-pooling. We chose max-pooling [33] for this study. As the point after pooling, the maximum value of the pool area is used. This minimizes the output's spatial size, reducing the model's computational complexity. We employed 1D max pooling with a stride size of 1 and a pooling size of 2.  
In order to generate the final output, dense layers were applied to produce an output equal to the number of classes (this study takes four classes into account). We selected \(y=fc(x,w,b)\) to represent the function performed by the dense layer, where \(y\) means the output, \(x\) denotes the input to the dense layer, \(w\) represents the weight matrix, and \(b\) describes the bias. The input \(x\) includes \(Z\) features. The component \(x_{i}\) represents feature \(i\). It is worth noting that \(w\) contains dimension \(Z\times A\), where \(A\) reflects the \(y\)'s dimension. It works with a vector \(x\) to generate the component \(j\) in \(y\), as shown in Equation (4).  
\[y_{j}=\sum_{i}w_{ij}x_{i}+b_{j} \tag{4}\]  
To prevent over-fitting and improve generalization, we used the Dropout [34] technique between dense layers. Dropout offers regularization by removing a portion of the previous layer's outputs.  
It should be noted that this step did not include:  
* The dropout rate.
* The activation functions.
* The number of nodes in the first three dense layers.  
These are among the hyperparameters that will be used as inputs for BO in the next subsection.