## 4 Results and Discussion
### Two-Sensor Configurations
#### 4.3.4 Confusion Matrix Analysis for Two-Sensor 50%-Overlapping Configuration  
The confusion matrices, displayed in Figure 11, provide detailed insights into the classification results for each model under the 50% overlapping data configurations. By presenting a comprehensive view of the predicted versus actual activity classes, these matrices enable a thorough assessment of model performance. They not only reveal the overall accuracy of each model but also illustrate specific strengths and weaknesses in handling different activities. The confusion matrices provide insightful details about the performance of different models in the two-sensor with 50%-overlapping configurations, showcasing how well each model can capture temporal dependencies and transitions between activities. DT: In Figure 10(a), the DT model correctly classifies a majority of the activity classes. However, it struggles with distinguishing between similar stationary activities, as seen in the 73 misclassifications of the class _stm_ws_. This limitation highlights the tendency of the DT model to overfit in overlapping data scenarios, which can result from its hierarchical structure that may not generalize well to nuanced differences between similar classes [26]. Moreover, the reliance on predetermined splitting criteria might lead to a lack of adaptability when encountering the subtle variations present in stationary activities. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Models**} & \multicolumn{3}{c}{**Accuracy**} & \multicolumn{3}{c}{**Precision**} & \multicolumn{3}{c}{**Recall**} & \multicolumn{3}{c}{**F1 Score**} \\ \cline{2-13}  & **Train** & **Validation Test** & **Train** & **Validation Test** & **Train** & **Validation Test** & **Train** & **Validation Test** \\ \hline DT & 0.9749 & 0.9675 & 0.9707 & 0.9749 & 0.9675 & 0.9707 & 0.9749 & 0.9675 & 0.9707 & 0.9749 & 0.9675 & 0.9707 \\ \hline KNN & 0.9705 & 0.9712 & 0.9672 & 0.9705 & 0.9712 & 0.9672 & 0.9705 & 0.9712 & 0.9672 & 0.9705 & 0.9712 & 0.9672 \\ \hline RF & 0.9758 & 0.9679 & 0.9730 & 0.9758 & 0.9679 & 0.9730 & 0.9758 & 0.9679 & 0.9730 & 0.9758 & 0.9679 & 0.9730 \\ \hline SVC & 0.9774 & 0.9715 & 0.9745 & **0.9774** & 0.9715 & **0.9745** & **0.9774** & 0.9715 & **0.9745** & **0.9774** & 0.9715 & **0.9745** \\ \hline XGBoost & 0.9776 & 0.9706 & 0.9749 & 0.9776 & 0.9706 & 0.9749 & 0.9776 & 0.9706 & 0.9749 & 0.9776 & 0.9706 & 0.9749 \\ \hline GRU & 0.9751 & 0.9749 & 0.9750 & 0.9751 & 0.9749 & 0.9750 & 0.9751 & 0.9749 & 0.9750 & 0.9751 & 0.9749 & 0.9750 \\ \hline LSTM & 0.9764 & 0.9758 & 0.9762 & **0.9764** & **0.9758** & **0.9762** & **0.9764** & **0.9758** & **0.9762** & **0.9764** & **0.9758** & **0.9762** \\ \hline
**TCN** & **0.9771** & **0.9764** & **0.9765** & **0.9771** & **0.9764** & **0.9765** & **0.9771** & **0.9764** & **0.9765** & **0.9771** & **0.9764** & **0.9765** \\ \hline Transformer & 0.9740 & 0.9763 & 0.9746 & 0.9740 & 0.9763 & 0.9746 & 0.9740 & 0.9763 & 0.9746 & 0.9740 & 0.9763 & 0.9746 \\ \hline \hline \end{tabular}
\end{table} 
Table 17: Performance comparison of two sensors with 50% overlapping data for various models, where the performance metrics are Accuracy, Precision, Recall, and F1 Score. Figure 11: _Cont._  
Figure 11: Confusion Matrices for models using a two-sensor configuration with 50% overlapping data segments: (**a**) DT, (**b**) KNN, (**c**) RF, (**d**) SVC, (**e**) XGBoost, (**f**) GRU, (**g**) LSTM, (**h**) TCN, (**i**) Transformer. KNN: The KNN confusion matrix in Figure 11b reflects its ability to accurately classify dynamic activities such as _run_wos_, where it achieves 454 correct classifications. However, it shows some difficulty with stationary activities, particularly in the class _stn_ws_, where 69 instances were misclassified. This behavior aligns with KNN's sensitivity to local neighbor choices and highlights its struggles in higher-dimensional feature spaces [35].