Causal and Explainable Machine Learning Framework for Heart Disease Prediction using XGBoost and SHAP

Authors

  • Mehtab Mushtaq Department of Computer Science, University of Kotli Azad Jammu and Kashmir, Kotli, 11100, Pakistan.
  • Zahid Mehmood Department of Computer Science, University of Kotli Azad Jammu and Kashmir, Kotli, 11100, Pakistan.
  • Adnan Arif Butt Department of Computer Science, University of Kotli Azad Jammu and Kashmir, Kotli, 11100, Pakistan.
  • Muhammad Nafees Ulfat khan Department of Computer Science, Mohi-ud-Din Islamic University, Nerian Sharif, 12080, Pakistan.

Keywords:

Heart Disease Prediction, Explainable AI, XGBoost, SHAP, Causality, PC Algorithm, Healthcare AI

Abstract

Cardiovascular disease constitutes one of the major leading causes of deaths in the globe. Early diagnosis is needed to enhance patient outcomes.Although machine learning models, including XGBoost, are highly accurate in predicting heart disease, they are black-box and therefore cannot be interpreted clinically.To overcome this shortcoming, we devised a new model that integrates: XGBoost and SHAP(SHapley Additive exPlanations), which yields the impact of each feature on the prediction. Using the PC (Peter-Clark) algorithm, we determined the causal relationship between features and the outcomes of heart diseases and differentiated causation with correlation.To have the system useful in real-life healthcare, we created a simple interface allowing doctors to input patient information, view predictions, and read about explanations in various levels of detail.Our model was tested on the UCI Heart Disease dataset and achieved 91% accuracy, 0.90 F1-score, and 0.95 AUC-ROC better than other common models (Logistic Regression, Decision Tree, and Random Forest). Our tool will assist doctors in making better judgments regarding the risk of heart disease by integrating good predictability, explicit explanations, and user-friendly design.

Downloads

Published

2025-11-29

How to Cite

Mehtab Mushtaq, Zahid Mehmood, Adnan Arif Butt, & Muhammad Nafees Ulfat khan. (2025). Causal and Explainable Machine Learning Framework for Heart Disease Prediction using XGBoost and SHAP. Journal of Computing & Biomedical Informatics, 10(01). Retrieved from https://jcbi.org/index.php/Main/article/view/1102