An Ensemble Machine Learning Framework for Robust Stroke Risk Prediction with Clinical Insights and Statistical Validation
Keywords:
Stroke Prediction; Machine Learning; Explainable AI; Ensemble Models; SHAP; Predictive HealthcareAbstract
Stroke remains one of the leading causes of death and long-term disability worldwide, largely due to the sudden interruption of cerebral blood flow. Despite its high burden, early prediction of stroke risk in routine clinical settings remains limited, particularly for resource-constrained healthcare systems where imaging-based deep learning solutions are impractical. To address this gap, we present a machine learning (ML)–driven framework for stroke risk stratification using structured demographic, lifestyle, and clinical data.
We analyzed a publicly available dataset comprising 5,110 patient records with 12 features, including age, hypertension, heart disease, smoking status, and BMI. Data preprocessing involved imputation of missing values, normalization of continuous features, and correction of severe class imbalance (~5% stroke-positive cases) using the Synthetic Minority Oversampling Technique (SMOTE). Nine classifiers were trained and benchmarked, with hyperparameters optimized via grid search under stratified 10-fold cross-validation. Performance metrics were reported as mean ± standard deviation and supplemented with bootstrap-based 95% confidence intervals.
Among the models, XGBoost achieved the highest predictive performance with 95.2% accuracy and an AUC of 0.96 (95% CI: 0.94–0.97), outperforming both classical baselines and other ensemble learners. Importantly, the integration of SHAP-based explainable AI enhanced interpretability by highlighting clinically plausible risk drivers such as age, glucose level, and hypertension.
The proposed pipeline demonstrates that lightweight, interpretable ML models can provide accurate, scalable, and deployment-ready decision-support tools for early stroke detection and prevention in real-world healthcare.

