This protocol describes a machine learning framework for heart disease prediction that combines data augmentation using generative adversarial networks, statistical and metaheuristic-based feature selection, and explainable artificial intelligence.
A subscription to JoVE is required to view this content. Sign in or start your free trial.
Method Article
This protocol describes a machine learning framework for heart disease prediction that combines data augmentation using generative adversarial networks, statistical and metaheuristic-based feature selection, and explainable artificial intelligence.
Heart disease is a major cause of death worldwide, making its early prediction an important clinical and computational issue. Several studies have addressed challenges such as data scarcity, feature selection, and model interpretability individually, but fewer studies have proposed an integrated framework that addresses these challenges in a synergistic manner. This paper presents a comprehensive predictive framework that uses: (1) a generative adversarial network (GAN) to address class imbalance and data scarcity; (2) a hybrid feature selection approach that combines statistical pre-filtering via Welch’s t.-test and Cohen’s d effect size, along with metaheuristic optimization via Harris Hawk Optimization; and (3) various explainable artificial intelligence methods, including SHAP, partial dependence plots, and odds ratios. This framework was assessed on the Cleveland and Statlog datasets, yielding strong accuracy, F1-scores, and ROC-AUC values compared with selected baselines and existing methods. The model provides a robust, interpretable computational framework for heart disease prediction, linking machine learning performance with clinical interpretability.
Cardiovascular diseases are one of the leading causes of morbidity and mortality worldwide, accounting for an estimated 17.9 million deaths per year1. Early and accurate prediction of heart disease is important for timely intervention and improved patient outcomes. In this context, heart disease prediction using machine learning (ML) algorithms faces three main challenges: the limited availability of high-quality medical data, high-dimensional feature spaces containing redundant or irrelevant variables, and the black-box nature of complex models, which can hinder clinical trust and adoption2. Recent work has combined ML ....
Access restricted. Please log in or start a trial to view this content.
Ethics statement, dataset, software, and data preparation
The findings of this study were based on the UCI Machine Learning Repository’s Heart Disease dataset. As this is a publicly accessible and de-identified resource, its use did not require ethical committee approval. The authors also verify the originality of this manuscript, confirming that it has not been previously published or submitted to other journals.
The Cleveland Heart Disease dataset was split into training and test sets at 80/20. The dataset typically contains 303 instances; therefore, approximately 242 samples were used for training, and 61 samples wer....
Access restricted. Please log in or start a trial to view this content.
Experimental settings and performance metrics
All experiments were conducted in Python 3.9 using scikit-learn, TensorFlow, and SHAP libraries. Stratified 10-fold cross-validation was employed. The evaluation metrics included Accuracy, Precision, Recall, F1-score, and ROC-AUC.
Performance comparison with selected baseline methods
.......| Method |
Access restricted. Please log in or start a trial to view this content.
The framework outlined here provides a reproducible approach for developing interpretable heart disease prediction models. A prototype clinical dashboard integrating these explanations is shown in Figure 4, which implements a three-stage workflow: pre-screening, decision support with SHAP, and intervention planning [Figure 4 here]. Several critical steps require close attention to ensure successful execution of this framework.
As shown in Table 5,.......
Access restricted. Please log in or start a trial to view this content.
The authors have no conflicts of interest to declare.
The authors acknowledge the support of Capital (Helwan) University and the Arab Open University for providing research facilities. This research did not receive any specific grant from funding agencies in the public, commercial, or non-profit sectors.
....Access restricted. Please log in or start a trial to view this content.
| Name | Company | Catalog Number | Comments |
|---|---|---|---|
| Cleveland Heart Disease Dataset | UCI Machine Learning Repository | https://archive.ics.uci.edu/ml/datasets/heart+disease | Benchmark heart disease dataset used for model development/evaluation |
| Django | Django Software Foundation | N/A | Alternative web framework for dashboard implementation |
| fancyimpute | fancyimpute developers | N/A | Optional MICE and KNN imputation sensitivity analysis |
| Flask | Pallets Projects | N/A | Web framework for dashboard implementation |
| HL7/FHIR API standard | HL7 International | N/A | Planned standard for EHR/dashboard integration |
| Keras | Keras developers | N/A | Neural network API used with TensorFlow/Keras for GAN architecture |
| matplotlib | matplotlib developers | N/A | Plotting library |
| MIMIC-III Database | PhysioNet | https://physionet.org/content/mimiciii/1.4/ | Critical care database for planned external validation |
| missingno | missingno developers | N/A | Missingness matrix visualization |
| NumPy | NumPy developers | N/A | Numerical computing |
| pandas | pandas developers | N/A | Data manipulation |
| PhysioNet | PhysioNet | https://physionet.org/ | Access platform/source for MIMIC-III |
| Python | Python Software Foundation | N/A | Version 3.9/3.9.7 |
| scikit-learn | scikit-learn developers | N/A | Machine learning library, including preprocessing, model training, cross-validation, and metrics |
| SciPy | SciPy developers | N/A | Statistical testing, including Welch’s t-test and Spearman correlation |
| SHAP | SHAP developers | N/A | Explainable AI library |
| Statlog Heart Disease Dataset | UCI Machine Learning Repository | https://archive.ics.uci.edu/ml/datasets/statlog+(heart) | Benchmark heart disease dataset |
| TensorFlow | N/A | Deep learning framework for GAN implementation | |
| UCI Machine Learning Repository | University of California, Irvine | https://archive.ics.uci.edu/ | Repository source for Cleveland and Statlog datasets |