## 2 Theoretical Background of Convolutional Neural Networks  
### Model Overview  
CNNs are a class of deep learning neural networks that display great capabilities in the task of pattern recognition. They are analogous to traditional Artificial Neural Networks (ANN), in the sense that they are composed of neurons learning in a self-optimizing fashion, updating the weights assigned to these neurons through a back-propagation algorithm, trying to emulate biological processes. Their most significant trait is unequivocally their ability to extract regional features, enabling researchers and developers to deal with complex tasks that are not possible with classic ANNs. Figure 3 illustrates the conceptualization of a CNN and its operations. As shown, having inserted the input into the neural network, the feature extraction-related elements of the architecture are actuated. First, convolutional layers undertake the task of feature regional recognition. Subsequently, the output of the convolutional layers is received by the activation functions that introduce nonlinearity in the feature learning task. This sequence can be repeated \(M\) times before the pooling layers receive the output of the final activation function, which reduces the dimensionality of the tensor that propagates through the network, attempting to decrease the computational cost. In turn, the process of _Convolution-Activation-Pooling_ is plausibly repeated \(N\) times before this pattern of alternating convolutional and pooling layers is concluded with the output of the last set of layers flattened into a 1D array vector, to be passed into a fully connected dense multilayer perceptron consisted of \(K\) layers, executing the classification. The operations of these procedures are described with greater detail in the following paragraphs. Input: While the great benefits of CNN utilization are well known when processing 2D data, such as images, it has been shown in industrial and academic applications that a modified version of CNN can handle 1D data as well (e.g., in the classification of financial time series or natural language processing). Feature extraction: As the name of the network suggests, the convolution layer is a fundamental component of a CNN, with multiple linear and nonlinear operations taking  
Figure 3: Conceptualization of a CNN. Figure 2: Overview of the 1D-CNN proposed in this study. place, contributing to the feature extraction. First, the convolution is characterized as a linear element-wise multiplication, with a small array called the kernel, which glides through the input tensor of the layer and convolves the value of each time step of the time series. The elements of the array, which occurred from the element-wise multiplication of the portion of the input tensor with the weights of the kernel, are summed to obtain the value of the output tensor in the corresponding position. Convolution on a time series is taking place as follows:  
\[F(x)=\mathbf{K}^{\diamond}\mathbf{S}(x)=\sum_{i=-N}^{N}K(i)S(x-i) \tag{1}\]  
The output tensor is called a feature map. Subsequently, the output of the convolution operation is fed into a nonlinear activation function. For many years, sigmoid and tanh were mainly chosen as they emulate the behavior of a biological neuron. However, problems caused in the back-propagation regarding the gradient diminishing when the architecture of the network is deep, prompted researchers to adopt a different activation function to introduce nonlinearity. Recently, the rectifier linear unit (ReLU) has started to gain popularity. Typically, in CNN models, pooling layers alternate with convolutional layers. Pooling layers undertake to downsample, reducing in-plane dimensionality of feature maps, thus diminishing the complexity for the forthcoming layers. The pooling procedure renders the model's translational invariant, and also offers immunity to small shifts and distortions. There are several types of pooling, the most popular form is max pooling.