## 2 Methodology
### Convolutional Neural Networks  
A CNN is a deep learning neural network commonly used for image classification, object detection, and other computer vision tasks [47]. The main component of a CNN is the convolution layer, which applies multiple filters/kernels to the input image to produce a set of feature maps. The convolution operation slides the filter over the input data and computes the dot product between the filter weights and the input data at each step. This operation produces a feature map. The size of the output feature map depends on the size of the input data, the size of the filter, and the stride and padding used during the convolution. After the convolution operation, it applies an activation function like rectified linear unit (ReLU) or sigmoid. This step introduces nonlinearity to the model. The feature maps obtained are then fed into other layers within the CNN, such as pooling and fully connected layers. These layers utilize the extracted features to perform classification or regression. The following equation is used to perform a convolution operation:  
\[y_{i}=(X*k_{i})+b_{i} \tag{1}\]  
where \(X\) is the input tensor, \(k_{i}\) is the \(i\)th convolution kernel, \(b_{i}\) is the bias vector, \(y_{i}\) is the \(i\)th obtained feature map, and \(*\) denotes the convolution operation. These feature maps are passed through an activation function \(\sigma\), as expressed  
\[m_{i}=\sigma(y_{i}) \tag{2}\]  
A subsequent pooling operation downsamples the feature maps produced by the convolutional layers, reducing the spatial size of the data and the number of parameters in the model. Max pooling is one of the most commonly used pooling types in CNNs and is functionally denoted as  
\[m_{i}^{l}=max\left(m_{i}^{l-1},p,s\right) \tag{3}\]  
yielding \(m_{i}^{l}\) as the \(i\)th feature map in the pooling layer \(l\), where its parameter \(m_{i}^{l-1}\) is the \(i\)th feature map in layer \(l-1\), \(p\) is the pooling size, and \(s\) is the stride. The fully connected layers connect every neuron in one layer to every neuron in the next layer, and they are typically used toward the end of the CNN to perform classification or regression on the extracted features.  
One-dimensional CNNs, which are variations of CNNs, are designed to process sequential data, such as time series [48]. The number of dimensions of the CNN refers to the number of dimensions over which the filter/kernel slides. The input and output of a 1D-CNN are two-dimensional. The first dimension is timesteps and the other is features. The basic architecture of a 1D-CNN is similar to a regular CNN, but the filters are applied only along the timesteps dimension as stated in [49]. The 1D convolution operation for multivariate time series data is depicted in Figure 1, where the height represents the number of time steps, its width is one, and the number of input features is equivalent to the depth or the number of channels. The lines represent filtering operations with 1D kernels.  
One of the main advantages of using 1D-CNNs is that they can capture local patterns and features within the sequential data, which can be helpful for tasks such as detecting time-dependent anomalies. Additionally, 1D-CNNs require less computational resources than other types of deep learning models, which can be helpful in applications with limited resources [48; 50].  
Overall, CNNs and 1D-CNNs are powerful deep learning models that have been shown to achieve successful results on a wide range of computer vision and sequential data tasks.