Evaluating Machine and Deep Learning Models for Stroke Prediction with Class Imbalance Handling
Stroke prediction plays an important role in healthcare, as it allows for the potential implementation of early measures and intervention. The Kaggle stroke dataset was used and compared between deep learning (DL) and traditional machine learning (ML) models. Preprocessing steps include imputation to the missing BMI values, one hot and label encoding, and z-score normalization, all applied before a stratified 5-fold cross validation with confidence intervals for the split. SMOTE was then applied exclusively to the training set to address class imbalance (~95% non-stroke). Eight classifiers were compared against each other which included five ML models: Random Forest (RF), Logistic Regression (LR), K-nearest Neighbor (KNN), Support Vector Machine (SVM), Decision Tree (DT) and three DL architectures: Multi-Layer Perceptron (MLP), Convolutional Neural Network (CNN) and Artificial Neural Network (ANN). Due to the severe class imbalance in the dataset, F1-score was adopted as the primary evaluation metric, as it balances precision, recall and better reflects the model ability to correctly identify the minority stroke class. The most successful models were LR (30% F1-Score, 88% Accuracy) and MLP (28% F1-Score, 84% Accuracy). This suggests that for this dataset, classical ML models may offer competitive performance compared to deep learning on structured tabular data.