CardioDiag: a machine learning approach for cardiovascular disease diagnosis using XAI-guided hybrid dimensionality reduction and optimized-based ensemble classifiers
Cardiovascular disease (CVD) includes various conditions such as heart failure, stroke, and coronary artery disease, and is a leading cause of mortality globally. Timely interventions are important, and early prediction can enhance patient outcomes and prevent severe complications. This article presents CardioDiag, a Machine Learning approach designed to enhance the accuracy of CVD diagnostics in clinical decision-making. Our approach employs the Percentile Method to handle outliers and reduce skewness in categorical features. To handle class imbalance, it incorporates the Localized Random Affine Shadow Sampling (LoRAS) technique, which generates synthetic samples while preserving the original data distribution. Additionally, CardioDiag introduces an explainable artificial intelligence-based hybrid dimensionality reduction criterion (XAIH-DRC) for feature engineering. This method combines statistical correlation analysis with feature importance obtained from the Local Interpretable Model-agnostic Explanations (LIME) model, ensuring optimal feature selection. The effectiveness of CardioDiag is validated using two benchmark datasets: the Five States dataset and the Mendeley dataset, demonstrating its ability to generalize across diverse patient populations. Central to CardioDiag are two proposed ensemble classifiers: the Optimized Voting-based Ensemble Classifier (OVEC) and the Optimized Stacking-based Ensemble Classifier (OSEC). Both models are optimized through a hyperparameter search using 5-fold cross-validation. Experimental evidence shows that the voting-based OVEC in CardioDiag provides competitive and stable performance; however, the stacking-based OSEC consistently achieves superior predictive results. Specifically, the stacking-based OSEC demonstrates absolute gains of approximately 1% to 3% in accuracy and F1-score, and between 3% and 4% in precision and ROC-AUC compared to existing individual and ensemble methods. Further analysis using calibration and decision curve evaluations confirms reliable probability estimation and clinically meaningful utility across a range of decision thresholds. These findings underscore the effectiveness of the CardioDiag approach in enhancing diagnostic accuracy and reliability. The observed improvements over state-of-the-art models support its utility in clinical decision-making and aid in the early diagnosis of CVD.