STROKE RISK PREDICTION USING MACHINE LEARNING: A COMPARATIVE STUDY AND PROTOTYPE SYSTEM

Author

FRANCIS DANIEL VARNEY,MR. SRIKANT SINGH


Abstract

 Stroke is a leading cause of death and long-term disability, and early identification of high-risk people supports prevention. This paper compares four machine learning classifiers (Logistic Regression, Random Forest, Support Vector Machine and XGBoost) for stroke risk prediction on the public Kaggle Stroke Prediction Dataset (5,110 patients, 4.9% with stroke) and presents a prototype web application. The pipeline uses median imputation, one-hot encoding, standardization and SMOTE applied only inside cross-validation folds, with a held-out test set of 1,022 patients. All models reached a ROC-AUC between 0.81 and 0.84. Logistic Regression (0.844) and SVM (0.843) achieved the highest AUC and recall (0.80 and 0.82), while XGBoost achieved the highest precision and F1-score (0.174 and 0.255) but the lowest recall (0.48). SHAP analysis showed that age was by far the dominant predictor, followed by body mass index and hypertension. A Streamlit prototype that returns a colour-coded risk category, a probability, a recommendation and a PDF report was built and checked with 11 automated tests; the model inside the prototype is trained on simulated data to demonstrate the system pipeline. The results show moderate discrimination, so the models are suitable only as an awareness aid and not for diagnosis.



Keywords

Stroke risk prediction, machine learning, class imbalance, SMOTE, SHAP, XGBoost, Streamlit.



Full Text:

Download Paper PDF


References


[1] American Heart Association/American Stroke Association, “2024 Guideline for the primary prevention of stroke: A guideline from the American Heart Association/American Stroke Association,” Stroke, 2024, doi: 10.1161/STR.0000000000000475.

[2] T. Vu et al., “Machine learning approaches for stroke risk prediction: Findings from the Suita Study,” J. Cardiovasc. Dev. Dis., vol. 11, no. 7, Art. no. 207, 2024, doi: 10.3390/jcdd11070207.

[3] E. Dritsas and M. Trigka, “Stroke risk prediction with machine learning techniques,” Sensors, vol. 22, no. 13, Art. no. 4670, 2022, doi: 10.3390/s22134670.

[4] M. Chun et al., “Stroke risk prediction using machine learning: A prospective cohort study of 0.5 million Chinese adults,” J. Am. Med. Inform. Assoc., vol. 28, no. 8, pp. 1719–1727, 2021.

[5] X. Tang, M. Tang, W. Liu, and S. Cui, “Explainable machine learning for stroke risk prediction: A comparative study with SHAP-based interpretation,” Front. Neurol., vol. 16, Art. no. 1716984, doi: 10.3389/fneur.2025.1716984.

[6] fedesoriano, “Stroke Prediction Dataset,” Kaggle. [Online]. Available: https://www.kaggle.com/datasets/fedesoriano/stroke-prediction-dataset

[7] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” J. Mach. Learn. Res., vol. 12, pp. 2825–2830, 2011.

[8] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discovery Data Mining, 2016, pp. 785–794.

[9] N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic minority over-sampling technique,” J. Artif. Intell. Res., vol. 16, pp. 321–357, 2002.

[10] S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” in Proc. Adv. Neural Inf. Process. Syst., vol. 30, 2017.

[11] G. Lemaître, F. Nogueira, and C. K. Aridas, “Imbalanced-learn: A Python toolbox to tackle the curse of imbalanced datasets in machine learning,” J. Mach. Learn. Res., vol. 18, no. 17, pp. 1–5, 2017.

Share your valuable work from Social Media Buttons