## 5 Post-Processing EMG Signals: Proposed Supervised Learning Model
### SLM Architecture  
In this study, we developed an advanced one-dimensional convolutional neural network (1D-CNN) designed for classification of surface electromyographic (sEMG) signals, which show temporal patterns indicative of muscle activity [59, 60, 61]. The input to the network is a three-dimensional tensor of shape (20,000, 6, 3), representing the sequence length and the number of channels of the sEMG signals. The SLM architecture is composed of a first convolutional layer (64 filters, kernel size = 5) with Rectified Linear Unit (ReLU) as an activation function to introduce nonlinearity and allow the network to learn complex patterns. This layer is intended to extract local features from sEMG signals, capturing important characteristics like spikes and troughs associated with muscle contractions. Batch normalization is then used to normalize the output, thereby stabilizing and accelerating the training process. Batch normalization guarantees that activations remain within a reasonable range, resulting in faster convergence and higher performance.  
The output of this layer is then passed through a max-pooling layer in order to downsample the dimensionality of the feature maps. This operation retains the most significant features and reduces computational complexity, making the network more efficient and less sensitive to small shifts in the input data. Immediately after, a dropout layer (rate = 0.3) is also used to prevent overfitting by randomly setting a fraction of the input units to zero during training, causing the network to learn redundant representations and improve generalization. The network then moves on to a second convolutional layer (128 filters, kernel size = 5), followed by another batch normalization layer. This convolutional layer extracts higher-level features from downsampled feature maps. A second max-pooling layer is used to reduce dimensionality further, followed by a dropout layer to prevent overfitting. Third and fourth convolutional layers capture even more complex patterns in sEMG signals and apply batch normalization to the output for stability. A global average pooling layer is then used to condense each feature map into a single value by averaging all of the values contained within it.  
At the end, the flattened output is then fed into a fully connected dense layer with 256 units and ReLU activation, which combines the learned features into a comprehensive representation. The output layer is made up of a single unit with a sigmoid activation function that returns a probability value between 0 and 1, indicating the possibility of the input being classified as neuropathic. The architecture of the constructed SLM has 19 layers following the input signal. (Figure 8).  
The framework was implemented with Tensorflow and the Keras library \"[[https://keras.io](https://keras.io)]([https://keras.io](https://keras.io))\" (accessed on 16 April 2024) in Python 3.11.9.  
The model was developed and tested on a machine equipped with an NVIDIA GPU, utilizing the CUDA and cuDNN libraries to accelerate the training process. The 1D-CNN model was built using the Sequential API from TensorFlow's Keras module. Below is the detailed implementation of the model architecture (Table 2).