## 3 Results
### Xai Application
#### 3.3.2 Local Explanation  
Local explanations focus on individual datapoints, and for this purpose, Kernel SHAP was utilized. It allows for the generation of explanations that cover the entire NN, providing a feature importance list for each of the 36 outputs and aiding in debugging unusual predictions. For instance, Figure 6 showcases an unexpected peak for detector n8 in energy range r1. Kernel SHAP in Figure 7 highlights the importance of the Fermi geographical longitude, which is expressed in degrees: it gradually increases to 360\({}^{\circ}\) and then returns to 0\({}^{\circ}\) as expected. However, due to a dataset issue (an interpolation error in longitude estimation), the value jumps to around 100\({}^{\circ}\), invalidating the result. The solution involves rectifying the dataset, as the NN strives to provide the best estimation possible. Nevertheless, this specific behavior has minimal impact on the application of the trigger algorithm employed in [9]. The error is confined to a single datapoint, and the trigger algorithm is sensitive to excessive count rates and not to lower count rates. Figure 4: Feature importance as determined by the Morris method for the 2019 dataset. Features are ranked by average importance, with the McIlwain L-parameter and Fermi longitude coordinate at the top. Conversely, certain detector flags indicating the Earth’s FoV occultation emerge as almost irrelevant factors in prediction. For a complete list of features and their descriptions, refer to Tables 2 and 3. Figure 5: Feature importance as determined by the Morris method for the 2014 dataset. Features are sorted by their average importance, with the McIlwain L-parameter and Fermi longitude coordinate as the most influential. In contrast to Figure 4, detector flags representing the Earth’s FoV occultation play a significant role in prediction. For a complete list of features and their descriptions, refer to Tables 2 and 3. Figure 6: Light curve of observed and estimated count rates for detector n0 in energy range \(r1\). An unexpected peak appears in the estimated count rates due to an error in the dataset for the longitude estimation. Another significant error type, more severe due to its contribution to false positive detections during the 2014 period (characterized by the solar maximum phase with numerous and significant solar flares), involves sudden steps in the background estimation. Figure 8 illustrates this behavior for detector n8 in energy range r1. In the SHAP analysis (refer to Figure 9), the most influential features are related to a flag feature: 1 indicates the detector is visible, while 0 signifies that its FoV is obscured by the Earth. Interestingly, what stands out is that detector n8 behavior seems influenced by the visibility of other detectors. This peculiar pattern cannot be attributed to data errors, as their correctness has been verified, but rather to a learned pattern within the neural network. Figure 8 presents the values of these features, demonstrating a clear correlation between the step behavior and changes in these flags. Figure 8: Observed and estimated count rate light curve for detector n8 in energy range r1. The unexpected steps in estimated count rates are attributed to variations in features such as n0_vis, n1_vis and n7_vis, with n8_vis remaining constant during this unusual estimation period. Figure 7: Kernel SHAP feature importance for the peak datapoint. The spacecraft geographical longitude is the most critical feature in determining the sudden count rate increase from a baseline count rate of 346 to 398 (the peak). This baseline is constructed using 15 datapoints before and after the peak, which are used for sampling values and perturbing the datapoint to provide an explanation. A potential simple solution in this scenario could involve omitting these features as inputs and evaluating whether model performance remains consistent and this behavior subsides. However, it is worth noting that these features might serve a purpose in correcting for solar activity effects.