# Explainable AI-Enhanced Human Activity Recognition for Human-Robot Collaboration in Agriculture
## 3 Results
### Model Explainability
#### 3.2.1 Global Feature Importance: Overview of Key Features Across All Classes
This level of detail allows the model to capture subtle variations in movement patterns linked to different task loads, making certain wrist-worm IMU components more relevant in classifying the activities. On the other hand, the components with the least average impact on the model's output were \"gy_left_wrist\", \"gy_right_wrist\", and \"gz_right_wrist\". Interestingly, the gyroscopic sensors on both wrists do not make a significant contribution to the model's predictions, as they are not among the top features in terms of importance, as shown in Figure 4. Generally, features related to accelerometric, gyroscopic, and magnetometric data across various directions (\(x,\ y,\ z\)) exhibit varying levels of importance. This highlights the value of integrating data from multiple sensor modalities to achieve a more robust activity recognition model. 2.2 Evaluation of Class-Specific Feature Importance: Analyzing Feature Contributions for Each Activity Class  
In this section, we delve into class-specific feature importance, focusing on the contributions of different sensor features for each individual class. Although this class-specific information is partially given in Figure 4, we examine each class separately for the sake of clarity. The SHAP variable importance plot ranking of the top five model features in decreasing order of contribution for Classes 0-9 is provided in Figure 5a-j. For \"standing still\" (Figure 5a), the most influential feature, namely, \"my_chest\", in conjunction with \"my_cervix\" and \"mx_cervix\", contributes significantly to the model's classification, likely due to the stable data provided by the chest sensor for this static activity. However, the wrist sensors, \"ax_left_wrist\" and \"ax_right_wrist\", are also important, displaying that while \"standing still\" is a low-movement activity, wrist sensors can still provide valuable information when paired with other body sensor data. For instance, they can help distinguish between \"standing still\" and other activities that involve similar body positions but different arm movements or body stances, which would be subtle in nature but impactful for classification. For the \"walking without a crate\" activity (Figure 5b), the top five features are \"my_cervix\", \"my_chest\", \"my_lumbar region\", \"ax_right_wrist\", and \"mx_left_wrist\". These features highlight the importance of sensors placed on the torso, mainly magnetometers, as they are crucial for capturing body movements during walking, while also, wrist sensors can capture arm swinging [63], a significant characteristic of walking. Regarding both \"bending to approach an empty/full crate\" activities, the SHAP variable importance plots reveal significant contributions from similar features. In the empty-crate case (Figure 5c), the top features are \"my_lumbar region\", \"gy_chest\", \"gy_cervix\", \"ax_right_wrist\", and \"my_chest\", whereas in the full-crate case (Figure 5d), the top features are \"my_lumbar region\", \"my_cervix\", \"ax_right_wrist\", \"az_chest\", and \"gy_chest\". These results stress the importance of sensors placed on the torso, as the lumbar spine is highly involved in flexion and extension during such tasks, while the neck orientation helps in stabilizing body posture during the bending task [64; 65]. In addition, the presence of the wrist sensor can be attributed to the different ways in which the hands are prepared to lift either an empty or full crate. Figure 5: SHapley Additive exPlanation (SHAP) variable importance plot ranking the top 5 model features in decreasing order of contribution for each class. The SHAP variable importance plots for both \"lifting an empty/full crate\" again disclose a consistent reliance on sensors placed on the torso, namely, on the lumbar region (\"my_lumbar region\"), chest (\"my_chest\" and \"az_chest\"), and cervix (\"gy_cervix\", \"gz_cervix\", and \"my_cervix\"). This result reflects the vertical, rotational, and stability-related movements required during lifting.