## 2 Materials and Methods
### Machine Learning Approach
The method splits the dataset into 'k' sub-samples, in which one sample is used for testing and the remaining k-1 dataset is used for training purposes. The whole process is repeated k times by varying the training samples and testing samples. After the k iterations, the best instance of the model (i.e., _validated model_) is selected and used for the classification of _unlabeled data_. As stated, the workflow of Figure 3 has been accomplished and validated with two instances of the _ML models_, namely MLP and CNN. Our MLP is a layered feedforward neural network with back-propagation algorithm [62], described in terms of the stochastic gradient descent algorithm, and it minimizes the categorical cross-entropy loss function. The activation function used for the hidden layer is ReLU (rectified linear unit), while the softmax function is used in the output layer. Other training parameter configurations of MLP are reported as follows. * Hidden layer size: 42;
* Number of samples by iteration: 50;
* Learning rate: 0.001;
* Gradient direction: 0.9;
* Epochs: 320. Let us notice that the raw data are preprocessed from linear predictive coding (LPC) to extract spectral features and, in addition, a discretized waveform parameterization of signals composed of 24 s windows is also considered as further input features, as proposed in [34]. The total number of features is 80: 56 spectral features from the LPC (using 8 subwindows of 3 s and setting the order equal to 6), and 24 waveform features from the discrete waveform parametrization. The second ML model is based on CNN [63], becoming a de facto standard for many applications in computer vision and machine learning [64; 65]. The method has been widely used in characterizing signals in any research field, especially those oriented to biomedical applications [61]. Herein, a one-dimensional convolutional neural, 1D CNN, has been employed; it has become a popular choice among ML researchers for the significant complexity reduction against the 2D CNN, reducing the computing times, and being used in real-time and low-cost applications. In particular, 1D CNN methods are used for processing time-series data or, particularly, for patient-specific ECG signals in the biomedical domain [66]. In our case, Figure 4 shows our 1D CNN. The proposed CNN is composed of four-layer blocks; each block includes a convolution one-dimension layer, the batch normalization operation, the ReLU activation function, and, finally, a MaxPooling operation. As shown in Figure 4, the initial convolutional layer has 128 filters used for our time-series data of size 2400, a kernel size of 80, and a stride of 4. The Xavier (also known as Glorot) uniform initializer was used to randomly initialize the weights of the layer. This block structure appears three times but with 128, 128, and 256 filters, respectively, in the layers called _input layer_, _layer 1_, and _layer 2_ in Figure 4. _Layer 1_ and _layer 2_ have instead a kernel size of 3 and stride 1. Finally, _layer 3_ has a similar design but uses 512 filters, with a kernel size 3 and stride 1. This last block also provides a dropout layer with 50% probability to avoid overfitting along with a Lambda \"mean\" layer. Finally, a dense layer with softmax activation provides a three-neurons output layer. The proposed CNN model architecture traced approximately 558,597 parameters on the samples trained to perform the classification. The parameter configuration of 1D CNN is chosen as follows. * Layers: 4: \(\bigcirc\) Filters: 128, 128, 256, 512 (respectively), \(\bigcirc\) Kernel initializer: Glorot uniform, \(\bigcirc\) Activation function: rectification linear unit (ReLU);
* Epochs: 200;
* Dropout: 50%;
* Last layer activation function: softmax;
* Loss function: categorical cross-entropy;
* Optimizer: Adam;
* Callbacks: ReduceLROnPlateau; \(\bigcirc\) Monitor: 'val loss'  
Figure 4: CNN architecture design with the colored layers.