Performance Evaluation of Stroke Prediction Model on Healthcare Dataset with Imbalanced Data
DOI:
https://doi.org/10.63254/acsse.v2i1.35Keywords:
stroke, XGBoost, random forest, SVM, medical predictionAbstract
This study is motivated by the growing need for machine learning–based prediction models for identifying stroke risk in medical datasets with severe class imbalance. This research compares three machine learning algorithms, namely Random Forest, Extreme Gradient Boosting (XGBoost), and Support Vector Machine (SVM), for predicting stroke occurrence using the Healthcare Stroke Dataset. Data preprocessing included missing value imputation, numerical feature standardization, and categorical feature encoding. The dataset was divided into training and testing sets using a stratified split. To address class imbalance, class weighting and Synthetic Minority Over-sampling Technique (SMOTE) were applied. Model performance was evaluated using macro precision, macro recall, and macro F1-score, which are appropriate for imbalanced medical data. XGBoost with class weighting achieved the best performance, yielding the highest macro F1-score of 0.59 while maintaining balanced stroke detection. Random Forest achieved high accuracy but showed limitations in detecting stroke cases, whereas SVM exhibited higher sensitivity but produced more false positives. These findings indicate that XGBoost with class weighting is the most suitable model and can serve as a baseline for developing clinical decision-support systems for early stroke risk detection. Future work includes hyperparameter optimization, additional clinical features, and larger datasets to improve model generalization.