# Enhancing Survival Analysis Model Selection through XAI(t) in Healthcare
## 4 Discussion
### Dataset-Level Explanations  
We computed the SurvSHAP values on the test data, retrieving and ranking the most important features. As depicted on the left side of Figure 6, relative to CPH, age emerges as the most important feature, followed by years of CPAP, renal dysfunction, COP, BMI categories, sex, and anemia. Similarly, in Figure 7, age remains a predominant feature, yet the LH model assigns almost the same importance (with minimum differences) to the other ones. In more detail, AHI comes in second, followed by renal dysfunction, SaO\({}_{2}\) min, years of CPAP, COPD, and anemia. In the LH model, these features exhibit greater importance in terms of their average contributions to the predictions compared to the CPH model. The reason behind the differences in feature importance can be attributed to the non-linear relationships between features and targets discovered by the LH model, which preferred numeric features over categorical ones in some cases. The temporal trends related to the model outcomes are depicted on the right side of Figures 6 and 7. Interestingly, in the CPH model, after \(\sim\)9 years (\(\sim\)110 months), years of CPAP, sex, and BMI categories gained importance with respect to renal dysfunction, anemia, and COPD, respectively. A similar behavior was seen in the LH model, where a discretization effect on predictions was observed. Although SaO\({}_{2}\) ranked fourth in terms of feature contribution and initially did not appear to be very important, in the last part of the observation period, it gained more and more importance as the number of months increased, becoming the third most important feature in the last part of the observation period. Finally, although in the CPH model, all features had similar contributions in the final observation period, we can observe a set of features consisting of AHI and SaO\({}_{2}\) and another composed of renal dysfunction, COPD, and years of CPAP. While in classical XAI approaches the variable importance is presented as a statistical measure reflecting the overall importance, the exploitation of SurvSHAP makes the variable importance change over time, thus leading to a different evaluation of the impact of predictions at time \(t\). Figure 6: Dataset-level explanations for the Cox regression model: on the left, the feature importance ranking according to the average of the absolute Shapley values; on the right, the feature importance according to the observation time. In the right part of the figure, the x-axis represents the event time expressed in months, where each tick represents the event (black—0, red—1). Figure 7: Dataset-level explanations for the log hazard model: on the left, the feature importance ranking according to the average of the absolute Shapley values; on the right, the feature importance according to the observation time. In the right part of the figure, the x-axis represents the event time expressed in months, where each tick represents the event (black—0, red—1). This dynamic understanding enables clinicians to assign different weights to features based on their evolving importance throughout all stages of patient care, contributing to a more personalized and effective patient care approach. Furthermore, we investigated the individual contribution of each feature for each subject by plotting a bee swarm plot, as depicted in Figures 8 and 9. Here, each data sample corresponds to several points in the plot according to its feature value. Aggregated SurvSHAP(t) values close to 0 typically indicate a minimal impact on the survival function. The above figures confirm that the models interpreted the feature values in a coherent way. High values of features considered risk factors or comorbidities in medicine contributed negatively to survival, while high values related to protective factors contributed positively. This alignment with medical understanding underscores the models' coherent interpretation of feature values and their impact on survival outcomes.