## 3 Results
### Comparison of the Machine Learning Algorithms Performance for Classification of the Hand Gestures  
Confusion matrices constitute a useful and popular measure for evaluating and visualizing the performance of ML algorithms while solving both binary and multiclass classification problems by comparing the actual values against those predicted by the ML model. In particular, a confusion matrix can be an \(N\times N\) matrix, where \(N\) stands for the number of classes. In the present analysis, \(N\) was equal to the examined hand gestures, i.e., five, as depicted in Figure 6, while the correspondence of the number of classes with the hand gesture is presented in Table 1. The confusion matrices derived using the six ML algorithms, namely LR, LDA, KNN, CART, NB, and SVM, are presented in Figure 5(a)-f, respectively. The diagonal cells show the number of hand gestures that were correctly classified, whereas the off-diagonal cells show the number of misclassified gestures. Higher diagonal values in Figure 6 indicate a better performance of the corresponding algorithm. Overall, the most problematic hand gestures were the \"rock\" (label 3) and \"victory\" (label 4), especially for LR, LDA, CART, and SVM algorithms.  
The classification report depicted in Table 2 summarizes the individual performance metrics for each ML algorithm. In simple terms, these metrics indicate the proportion of, (a) true results among the entire number of examined cases (accuracy), (b) the predicted values that turned out to be truly positive (precision), and (c) actual positives that turned out to be correctly predicted (recall). Lastly, the F1-score combines the precision and recall by considering their harmonic mean. As can be deduced from Table 2, KNN, LDA, and SVM seemingly outperformed the other investigated algorithms, while the NB algorithm gave the worst results.  
Lastly, Figure 7 depicts the box plots pertaining to the accuracy of the investigated classifiers as a means of offering a visual summary of the data regarding the identification of the mid-point of the data (the orange line), as well as the skewness and dispersion of the dataset. As an example, if the median is closer to the bottom or to the top of the box, the distribution tends to be skewed. In contrast, if the median is in the middle of the box, and the length of the whiskers is approximately the same on both sides, the distribution is symmetric. Lastly, the interquartile range (IQR), i.e., the range of the box, includes 50% of the values; thus, a longer box indicates more dispersed data.  
Concerning the present analysis, the NB classifier appeared to be positively skewed, while outliers were also observed (plotted as circles beyond the whiskers) for this case. Focusing on the KNN, LDA, and SVM, which demonstrated the best performance, the obtained accuracy values had about the same median and were not symmetrical, spreading out more on the upper side. Moreover, KNN and LDA had approximately the same range of data, larger as compared to the corresponding range of SVM. Lastly, the dispersion of accuracy values was the same for the aforementioned three algorithms, as can be deduced from their IQR values.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Accuracy** & **Precision** & **Recall** & **F1-Score** \\ \hline LR & 0.831 & 0.744 & 0.730 & 0.737 \\ LDA & 0.875 & 0.811 & 0.810 & 0.811 \\ KNN & 0.875 & 0.839 & 0.821 & 0.830 \\ CART & 0.800 & 0.703 & 0.723 & 0.713 \\ NB & 0.753 & 0.561 & 0.618 & 0.588 \\ SVM & 0.872 & 0.829 & 0.810 & 0.819 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Classification report for the performance of the six investigated machine learning algorithms.  
Figure 6: Confusion matrices showing the performance of **(a)** LR, **(b)** LDA, **(c)** KNN, **(d)** CART, **(e)** NB, and **(f)** SVM algorithms. Labels 0–4 correspond to “fist” (0), “flat” (1), “okay” (2), “rock” (3), and “victory” (4) hand gestures.