An Explainable AI-Based Framework for Cardiovascular Disease Detection and Risk Prediction Using Machine Learning

Cardiovascular diseases (CVDs) are still one of the
leading causes of death in the world, and traditional screening
methods are often unable to detect early warning signs. The
authors propose a dual-purpose machine learning model that is
able to detect the presence of a heart disease and to predict a
continuous cardiovascular risk score from the same 1,035 patient
dataset. For this work, sixteen classification and regression
algorithms have been tested, some of which had never been
used in the reference study it is based on: ExtraTrees, AdaBoost,
Voting (Hard/Soft) ensembles for classification and ExtraTrees,
VotingRegressor, and Gaussian Process for regression. A moder
ate SMOTE strategy was employed to counteract class imbalance,
and a stratified 70/30 train-test split and 5-fold cross-validation
was used to prevent overfitting. ExtraTrees showed the best
classification performance (97.65% ± 0.95% CV; 98.71% test
accuracy; AUC = 0.998), while Linear Regression showed the best
regression performance (CV R² = 0.9794 ± 0.017; test R² = 0.99).
Interestingly, Voting Soft did not outperform ExtraTrees, which
means that the errors of the tree-based models are correlated.
SHAP and LIME gave interpretability on the global (chest pain
type, number of major vessels (ca), exercise-induced angina) and
local level (thalassemia status). The results demonstrate that
a well validated and modestly-enriched structure can achieve
comparable and more accurate performance to previously re
ported benchmark, while being transparent and overfitting proof
resistant.