An interpretability heart disease prediction model based on stacking ensemble with SHAP
Abstract
Introduction: In the big data era, healthcare data has grown exponentially, presenting opportunities to explore the pathogenesis of heart disease. Clarifying the correlations between health indicators and heart disease is crucial for early prevention. This study employs ensemble learning to identify the key influencing factors, assisting clinicians in understanding the pathogenesis and enhancing prediction strategies. Methods: A two-layer stacking ensemble model is proposed, integrating Naive Bayes, Decision Trees, CatBoost and Gradient Boosting Trees to enhance prediction accuracy. To address ensemble models' complexity and poor interpretability, the SHAP technique is introduced to visualize the decision-making logic of the ensemble model. Results: Experimental results show that the stacking model achieved 86.69% accuracy, 87.14% weighted precision, 86.69% weighted recall, and 86.91% weighted F1-score. It balances precision and recall, unlike single learners that prioritize one over the other. Global interpretive analysis demonstrates that age, sleep duration, self-rated health status and BMI are critical factors in assessing cardiovascular risk. Local interpretive analysis is conducted to evaluate the contribution of each feature to the prediction results of individual samples. Discussion: The stacking model's superior performance demonstrates that ensemble learning can overcome the limitations of single learners. Additionally, key predictive factors are identified: maintaining an average sleep duration of 7-8 hours significantly reduces heart disease risk, while advanced age and poor health status increase susceptibility. This study provides a reliable predictive tool for personalized heart disease prevention and treatment.
Fields of Study & Subjects
Artificial Intelligence in Healthcare
Machine Learning in Healthcare
Phonocardiography and Auscultation Techniques
Publication details
- Journal / source
- Frontiers in Molecular Biosciences
- Publisher
- Frontiers Media SA
- Volume
- 12
- Pages
- 1763157–1763157
- Publication date
- 20 February 2026
- Language
- EN