Stroke is a leading cause of death and disability worldwide, making early detection essential. This study compares three machine learning algorithms Support Vector Machine (SVM), Random Forest, and XGBoost for stroke prediction. The dataset includes Kaggle data for training and clinical data from Indonesian primary healthcare (Puskesmas) for external validation. Pre-processing involved handling missing values, encoding categorical features, normalization, and balancing using SMOTE. Performance was evaluated using accuracy, precision, recall, F1-score, AUC-ROC and AUC-PRC. Unlike most prior studies, this research incorporates clinical data to assess generalizability in real-world settings. Results show that Random Forest and XGBoost outperform SVM, especially with clinical data. This study contributes a practical perspective by validating models using local datasets and emphasizes the importance of robust algorithms and external validation in medical prediction systems.
Copyrights © 2025