Explainable XGBoost framework for multi-class disease severity prediction: a clinical machine learning study with SHAP-based interpretability
Keywords:
Disease Severity Prediction, XGBoost, SHAP, Machine Learning, Clinical Decision Support, Class ImbalanceAbstract
Non-communicable diseases (NCDs) are a major growing problem, and responsible for around 74% of all deaths globally. Early and correct stratification of the severity of the disease is essential for timely therapeutic interventions, efficient use of clinical resources and patient benefits. Traditional Clinical Scoring Systems (CSSs) like APACHE II and SOFA are based on handcrafted and limited features and miss the complex and non-linear interactions between variables in multi-morbid patients. In this study, a novel and interpretable machine learning (ML) pipeline is developed based on extreme gradient boosting (XGBoost) model for four class disease severity prediction (Mild, Moderate, Severe, Critical). A retrospective multi-centre clinical dataset of 12450 patient records was collected between 2018-2024 from three tertiary care hospitals of Maharashtra, india and de-identified for analysis. Data preprocessing involved multiple imputation by chained equations (MICE) for missing value imputation, target encoding for categorical features and robust scaler normalization and synthetic minority oversampling technique (SMOTE) for handling class imbalance. The hyper parameters of XGBoost were tuned using the Optuna framework with a Bayesian Optimization algorithm over 200 trials that have been performed with stratified 5-fold CV. In comparison to four baseline classifiers, the proposed XGBoost model obtained the accuracy of 93.6%, precision of 92.8%, recall of 93.1%, F1-score of 92.9%, and an AUC-ROC of 0.971, which is significantly better than that of Logistic Regression (78.4%), Random Forest (83.1%), Support Vector Machine (80.7%), and Multilayer Perceptron (85.3%). In this case, the Expected Calibration Error (ECE) was 0.042, which verified that the probabilistic results were well calibrated. SHAP analysis revealed that blood glucose level, age, and BMI were the top three most discriminative clinical features; HbA1c was a significant fourth feature. Patient-level SHAP explanations filled in the transparency gap between clinical decision-making and model predictions. This framework proves that a high predictive accuracy and clinical interpretability can be achieved while having the advantages of being easily deployable in a resource constrained healthcare environment connected to the IIoT, and extendable to future federated learning architectures.
References
A. Y. Hannun et al., 'Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network', Nat. Med., vol. 25, no. 1, pp. 65-69, Jan. 2019. doi.org/10.1038/s41591-018-0268-3
W. A. Knaus, E. A. Draper, D. P. Wagner, and J. E. Zimmerman, 'APACHE II', Crit. Care Med., vol. 13, no. 10, pp. 818-829, Oct. 1985. doi.org/10.1097/00003246-198510000-00009
J. L. Vincent et al., 'The SOFA (Sepsis-related Organ Failure Assessment) score to describe organ dysfunction/failure. On behalf of the Working Group on Sepsis-Related Problems of the European Society of Intensive Care Medicine', Intensive Care Med., vol. 22, no. 7, pp. 707-710, July 1996. doi.org/10.1007/BF01709751
P. Rajpurkar et al., 'Deep learning for chest radiograph diagnosis: A retrospective comparison of the CheXNeXt algorithm to practicing radiologists', PLoS Med., vol. 15, no. 11, p. e1002686, Nov. 2018. doi.org/10.1371/journal.pmed.1002686
E. W. Johnson et al., 'MIMIC-IV, a freely accessible electronic health record dataset', Sci. Data, vol. 10, no. 1, p. 1, Jan. 2023. doi.org/10.1038/s41597-023-01945-2
B. Shickel, P. J. Tighe, A. Bihorac, and P. Rashidi, 'Deep EHR: A survey of recent advances in deep learning techniques for electronic health record (EHR) analysis', IEEE J. Biomed. Health Inform., vol. 22, no. 5, pp. 1589-1604, Sept. 2018. doi.org/10.1109/JBHI.2017.2767063
S. Fouladvand, M. Noshad, M. K. Goldstein, V. J. Periyakoil, and J. H. Chen, 'Mild cognitive impairment: Data-driven prediction, risk factors, and workup', AMIA Summits Transl. Sci. Proc., vol. 2023, pp. 167-175, 2023. doi.org/10.1016/j.fuel.2026.139634
E. J. Topol, 'High-performance medicine: the convergence of human and artificial intelligence', Nat. Med., vol. 25, no. 1, pp. 44-56, Jan. 2019. doi.org/10.1038/s41591-018-0300-7
S. Lundberg and S.-I. Lee, 'A unified approach to interpreting model predictions', arXiv [cs.AI], 22- May-2017. doi.org/10.48550/arXiv.1705.07874
S. M. Lundberg et al., 'From local explanations to global understanding with explainable AI for trees', Nat. Mach. Intell., vol. 2, no. 1, pp. 56-67, Jan. 2020. doi.org/10.1038/s42256-019-0138-9
S. Purushotham, C. Meng, Z. Che, and Y. Liu, 'Benchmarking deep learning models on large healthcare datasets', J. Biomed. Inform., vol. 83, pp. 112-134, July 2018. doi.org/10.1016/j.jbi.2018.04.007
A. Y. Hannun et al., 'Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network', Nat. Med., vol. 25, no. 1, pp. 65-69, Jan. 2019. doi.org/10.1038/s41591-018-0268-3
F. Doshi-Velez and B. Kim, 'Towards A rigorous science of interpretable machine learning', arXiv [stat.ML], 28-Feb-2017. doi.org/10.48550/arXiv.1702.08608
N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, 'SMOTE: Synthetic minority over- sampling technique', J. Artif. Intell. Res., vol. 16, pp. 321-357, June 2002. doi.org/10.1613/jair.953
H. He, Y. Bai, E. A. Garcia, and S. Li, 'ADASYN: Adaptive synthetic sampling approach for imbalanced learning', in 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), Hong Kong, China, 2008. doi.org/10.1109/IJCNN.2008.4633969
A. Fernandez, S. Garcia, F. Herrera, and N. V. Chawla, 'SMOTE for learning from imbalanced data: Progress and challenges, marking the 15-year anniversary', J. Artif. Intell. Res., vol. 61, pp. 863-905, Apr. 2018. doi.org/10.1613/jair.1.11192
K. C. Straathof et al., 'Haemopoietic stem-cell transplantation with antibody-based minimal-intensity conditioning: a phase 1/2 study', Lancet, vol. 374, no. 9693, pp. 912-920, Sept. 2009. doi.org/10.1016/S0140-6736(09)60945-4
L. Riggs, M. Keall, P. Howden-Chapman, and M. G. Baker, 'Environmental burden of disease from unsafe and substandard housing, New Zealand, 2010-2017', Bull. World Health Organ., vol. 99, no. 4, pp. 259-270, Apr. 2021. doi.org/10.2471/BLT.20.263285
M. Singer et al., 'The third international consensus definitions for sepsis and septic shock (sepsis-3)', JAMA, vol. 315, no. 8, pp. 801-810, Feb. 2016. doi.org/10.1001/jama.2016.0287
L. Grinsztajn, E. Oyallon, and G. Varoquaux, 'Why do tree-based models still outperform deep learning on tabular data?', arXiv [cs.LG], 18-July-2022. doi.org/10.52202/068431-0037
C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger, 'On calibration of modern neural networks', arXiv [cs.LG], 14-June-2017. doi.org/10.48550/arXiv.1706.04599
Published
How to Cite
Issue
Section
Copyright (c) 2025 The Author(s)

This work is licensed under a Creative Commons Attribution 4.0 International License.