ORIGINAL RESEARCH article
Front. Mol. Biosci.
Sec. Molecular Diagnostics and Therapeutics
An Interpretability Heart Disease Prediction Model Based on Stacking Ensemble with SHAP
Yanjie Chen 1
Liqiang Chong 1
Zhenghao Bao 1
Shaoqiang Wang 2
Yuchen Wang 2
Yanan Feng 3
1. The Affiliated Hospital of Qingdao University, Qingdao, China
2. Qingdao University of Technology, Qingdao, China
3. Department of Abdominal Ultrasound, The Affiliated Hospital of Qingdao University, Qingdao, China
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Abstract
In the era of big data, the healthcare sector has witnessed exponential growth in data accumulation. This research employed ensemble learning techniques to explore the correlations between various health indicators and heart disease, identifying key features that significantly influence disease prediction and assisting medical professionals in understanding the pathogenesis of heart disease. By constructing a two layer stacking ensemble model that integrates the strengths of four base learners—Naive Bayes, Decision Trees, CatBoost, and Gradient Boosting Trees, the model achieves enhanced prediction accuracy and stability. To address the challenges of high complexity and poor interpretability in ensemble models, we introduce the SHAP technique to visualize the decision - making logic of the ensemble model. Experimental results demonstrate that the stacking ensemble model achieves 86.69% accuracy, 87.14% weighted average precision, 86.69% weighted average recall, and 86.91% weighted average F1 score. Unlike single learners that prioritize high precision at the expense of recall, the stacking model strikes an optimal balance between both metrics. Furthermore, we identify key predictors: maintaining an average sleep duration of 7 - 8 hours significantly reduces the risk of heart disease, while advanced age and poor health status increase susceptibility.
Summary
Keywords
classifier, Heart disease, Interpretability, Shap, Stacking ensemble
Received
08 December 2025
Accepted
29 December 2025
Copyright
© 2025 Chen, Chong, Bao, Wang, Wang and Feng. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Shaoqiang Wang; Yanan Feng
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.