## 6 Results and Discussion
### Interpretation of Results
Figure 29: Performance metrics for KNN, NB, and SVM classifiers using data from one session. Our findings in this proposed work, based on the GRABMyo dataset, contribute significantly to the current state of the art by improving generalization across different types of gestures and users due to the dataset's diversity. Our models achieve higher accuracy and robustness in gesture recognition, which is a notable improvement over models trained on more limited datasets. Additionally, this proposed work introduces new or improved methods for feature extraction and signal processing capable of handling the complexity of the GRABMyo dataset, thereby advancing current methodologies. The real-world applicability of the models developed using the GRABMyo dataset is also enhanced due to its realistic recording conditions and participant diversity, making a significant impact on practical implementations in prosthetics, rehabilitation, and human-computer interaction. This study employs the GRABMyo dataset, consisting of EMG signals from the forearm of 43 participants performing 16 gestures, each repeated seven times per gesture across three sessions. EMG signals are captured using surface electrodes placed on the forearm muscles and sampled at a high frequency to ensure detailed capture of muscle activity. The raw EMG signals undergo preprocessing, including bandpass filtering (20-450 Hz) to remove noise and motion artifacts, normalization to ensure uniformity across participants and gestures, and segmentation into fixed-length windows (200 ms) with a 50% overlap to enhance temporal resolution. Various time-domain and frequency-domain features are extracted from each signal segment, including Mean Absolute Value (MAV), Waveform Length (WL), Zero Crossing (ZC), Slope Sign Change (SSC), Root Mean Square (RMS), Energy of Wavelet Coefficients (EWLs), and Enhanced Mean Absolute Value (EMAV). Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA) are employed for dimensionality reduction: PCA is selected for its ability to retain 95% of the variance by transforming features into orthogonal components, while LDA is chosen to maximize class separation, retaining the most discriminative features. Three machine learning classifiers--K-Nearest Neighbor (KNN), the Support Vector Machine (SVM), and Naive Bayes (NB)--are evaluated to determine the most effective model for EMG signal classification. KNN is included due to its simplicity and effectiveness in classification tasks with small datasets; the number of neighbors (k = 5) is selected via cross-validation using the Euclidean distance metric and uniform weighting scheme. The SVM is chosen for its robustness in high-dimensional spaces and effectiveness with small to medium-sized datasets, employing a Radial Basis Function (RBF) kernel with a regularization parameter (C = 1.0), kernel coefficient (gamma = 1/n_features), and a stopping criterion tolerance (tol = 1 \(\times\) 10\({}^{-3}\)), with balanced class weights to handle class imbalance. The Naive Bayes classifier is selected for its simplicity and efficiency, using a Gaussian model with priors estimated from the training data. The dataset is split into training (70%), validation (15%), and test (15%) sets, with five-fold cross-validation employed during training to tune hyperparameters and prevent overfitting. Performance metrics include accuracy, precision, recall, and F1-score to ensure a comprehensive evaluation of model performance. Implementation is conducted using Python, leveraging Scikit-Learn for machine learning, SciPy for signal processing, and NumPy for numerical computations, on a workstation with an Intel i7 processor, 16 GB RAM, and an NVIDIA GPU for accelerated computation. This detailed methodology ensures the transparency and reproducibility of the study's results, providing a clear rationale for the selection of specific methods and parameter settings to optimize the decoding of EMG signals for controlling arm movements.