## 4 Results
### Comparison of Machine Learning Algorithms' Performance
#### 4.2.1 Performance Comparison of All Algorithms on Sensor Data
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Sound Training** & **F1 Score \(\uparrow\)** & **Precision \(\uparrow\)** & **Recall \(\uparrow\)** & \begin{tabular}{c} **Training** \\ **Time (s) \(\downarrow\)** \\ \end{tabular} & \
\begin{tabular}{c} **Test Time** \\ **(s) \(\downarrow\)** \\ \end{tabular} &
\begin{tabular}{c} **Memory** \\ **Usage (MB) \(\downarrow\)** \\ \end{tabular} \\ \hline KNNs & 0.961 & 0.962 & 0.961 & 109.187 & 0.149 & 2.621 \\ \hline SVM & 0.662 & 0.662 & 0.664 & 323.364 & 4.850 & 2.168 \\ \hline Random Forest & 0.956 & 0.957 & 0.955 & 4125.98 & 0.137 & 45.102 \\ \hline Decision Trees & 0.957 & 0.957 & 0.957 & 2777.85 & 0.005 & 32.883 \\ \hline XGBoost & 0.682 & 0.695 & 0.677 & 10.212 & 0.054 & 66.902 \\ \hline Naive Bayes & 0.618 & 0.628 & 0.615 & 9.898 & 0.017 & 5.297 \\ \hline Logistic Regression & 0.658 & 0.656 & 0.667 & 307.733 & 0.350 & 7.000 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of performance metrics of sound training algorithms. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Light Training** & **F1 Score \(\uparrow\)** & **Precision \(\uparrow\)** & **Recall \(\uparrow\)** & \begin{tabular}{c} **Training** \\ **Time (s) \(\downarrow\)** \\ \end{tabular} & \
\begin{tabular}{c} **Test Time** \\ **(s) \(\downarrow\)** \\ \end{tabular} &
\begin{tabular}{c} **Memory** \\ **Usage (MB) \(\downarrow\)** \\ \end{tabular} \\ \hline KNNs & 0.7452 & 0.743 & 0.749 & 14,327.1 & 0.061 & 69.664 \\ \hline SVM & 0.616 & 0.628 & 0.626 & 19,487.8 & 6.815 & 81.918 \\ \hline Random Forest & 0.7457 & 0.744 & 0.748 & 5263.3 & 0.225 & 39.305 \\ \hline Decision Trees & 0.743 & 0.667 & 0.751 & 30.647 & 0.006 & 14.043 \\ \hline XGBoost & 0.664 & 0.667 & 0.671 & 2.584 & 0.038 & 15.465 \\ \hline Naive Bayes & 0.613 & 0.626 & 0.615 & 12.955 & 0.010 & 2.891 \\ \hline Logistic Regression & 0.622 & 0.626 & 0.635 & 24.623 & 0.162 & 1.945 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of performance metrics of light training algorithms. Table 8 compares crowd training algorithms. Random Forest has the highest F1 score (0.406), precision (0.412), and recall (0.422) with moderate resource usage (1143.8 s training, 9668 MB memory). KNNs (F1 0.402, 94.98 s) is a balanced alternative. Decision Trees (F1 0.396, 141.59 s, 0.005 s testing, 6629 MB) are fast and efficient. XGBoost (F1 0.388, 279.93 s, 86,316 MB) has a low F1 score and high memory. SVM (F1 0.268, 725,271 s) is weak. Naive Bayes (F1 0.243, 2004 MB) has the lowest performance and least memory. Logistic Regression (F1 0.276, 5297 MB) also has limited performance. Table 9 compares general evaluation training algorithms. KNNs (F1 0.9904, 1360.9 s, 12332 MB) and Random Forest (F1 0.9902, 7309.2 s, 21,762 MB) have the highest F1 scores but are resource-intensive. Decision Trees (F1 0.984, 330.47 s, 0.005 s testing, 8785 MB) are the most balanced. XGBoost (F1 0.741, 20,602 s, 71,059 MB) has a fast training time but low performance and high memory. SVM (F1 0.945, 3146.9 s, 6510 s testing) is impractical. Naive Bayes (F1 0.429, 5992 MB) and Logistic Regression (F1 0.493, 1215 MB) are lightweight but have low performance. The performance analysis compared models trained on individual sensor data versus a combined model. The combined model, analyzing all sensor data concurrently, significantly outperformed the individual models across the accuracy, precision, recall, and F1 score metrics. The comparative analysis highlighted KNNs' strong performance, especially its F1 score, in the general evaluation. This justifies focusing this study on KNNs. Further analysis findings will be detailed in subsequent sections, with a broader discussion of all algorithms in the Conclusions.