Machine learning-based prediction of stroke using random forest with SMOTE balancing and model interpretability through LIME and SHAP
Abstract
Stroke remains one of the leading causes of death and long-term disability worldwide, highlighting the critical need for timely identification and risk assessment. This study introduces a stroke prediction model using the Random Forest machine learning algorithm, enhanced by the Synthetic Minority Over-sampling Technique (SMOTE) to address class imbalance. Furthermore, the study integrates interpretability tools—LIME and SHAP—to improve model transparency. The dataset, sourced from Kaggle, consists of 5,110 records and underwent preprocessing steps, including handling missing values, feature engineering, encoding categorical variables, and normalizing continuous features. SMOTE was applied to balance the training set, and the model was subsequently trained and evaluated using performance metrics and ROC-AUC analysis. The model demonstrated excellent performance with an accuracy of 93% and a ROC AUC of 0.98, indicating strong discriminatory power between stroke and non-stroke cases. Notable improvements in sensitivity (95%) and F1-score (0.93) were observed for the stroke class. Additionally, SHAP and LIME provided clear insights into key predictors, such as age, average glucose level, hypertension, and BMI. Overall, this framework delivers a robust and interpretable pipeline for stroke prediction, incorporating model transparency, which is crucial for clinical applications. The findings suggest that the combination of machine learning techniques and interpretability can enhance predictive accuracy and provide valuable insights to support clinical decision-making.
Fields of Study & Subjects
Artificial Intelligence in Healthcare
Imbalanced Data Classification Techniques
Acute Ischemic Stroke Management
Publication details
- Journal / source
- Malque Health
- Volume
- 2
- Issue
- 2
- Pages
- 2026006–2026006
- Publication date
- 15 January 2026