Abstract
Artificial intelligence (AI) is increasingly being used to improve patient care and management. In this paper, we propose explainable AI (XAI) models for predicting severe hypoglycemia (SH) and diabetic ketoacidosis (DKA) episodes in adults with type 1 diabetes (T1D) and relapses in adults with relapsing-remitting multiple sclerosis (RRMS). We follow a three-step process in this study: (1) develop baseline machine learning (ML) models, (2) improve the models using ReliefF feature selection technique, and develop sex-stratified models, (3) explain the models and their results using SHapley Additive exPlanations (SHAP). We built six ML models (XGBoost, LightGBM, CatBoost, AdaBoost, random forest, and linear regression) for all scenarios. Applying the ReliefF feature selection led to improved model performance in predicting all outcomes compared to the baseline models. Additionally, sex-stratified models further improved the prediction of SH episodes and relapses. The F1 scores for predicting SH episodes in male and female patients were 84.07% and 84.95%, respectively, and the DKA prediction model achieved an F1 score of 78.67%. The proposed relapse prediction models outperformed existing models with F1 scores of 84.55% (males) and 76.11% (females), and ROCs of 70.26% (males) and 69.05% (females). Our results highlight the importance of considering sex differences, socioeconomic factors, and physical and mental health in medical outcome prediction. Boosting ML algorithms were found to be effective in detecting SH and DKA in T1D patients and relapses in RRMS patients compared to conventional tree-based ML and statistical models