Abstract
Post-stroke seizures (PSS) manifests variably due to ischemic brain injury, yet its risk factors remain unclear. This study developed a machine learning (ML) model using clinical and laboratory data to predict PSS risk in acute ischemic stroke (AIS) patients post-thrombolysis, aiming to enhance risk assessment and clinical management. Retrospective analysis included 332 AIS patients treated between January 2020 and November 2024. Twenty-one variables (demographics, clinical parameters, lab biomarkers) were analyzed. Establish a diagnostic model with the occurrence of seizures after thrombolytic surgery as the classification variable. Missing data were handled via median/mean substitution, and class imbalance was corrected using synthetic minority oversampling technique. Feature selection combined expert consensus and Boruta algorithm. The dataset was split into training (70%) and testing (30%) cohorts. Seven ML models - logistic regression, Naïve Bayes, support vector machines, multilayer perceptron, AdaBoost, gradient boosting decision tree, and random forest (RF) - were evaluated using area under the curve (AUC), Brier score, accuracy, sensitivity, and specificity. Shapley Additive exPlanations (SHAP) analysis interpreted feature importance. PSS occurred in 39 patients (11.7%). Four predictors were identified: age, serum sodium, serum calcium, and fasting blood glucose. The RF model achieved optimal performance (AUC: 0.867, 95% CI: 0.793-0.930); accuracy: 0.803 (95% CI: 0.73-0.869); specificity: 0.810 (95% CI: 0.71-0.898), F1-score: 0.797 (95% CI: 0.711-0.87); positive predictive value: 0.797 (95% CI: 0.691-0.897), Kappa: 0.606 (95% CI: 0.441-0.739)). SHAP ranked fasting blood glucose as the strongest predictor, followed by serum sodium, serum calcium, and age. Lower electrolyte levels, elevated glucose, and younger age correlated with higher PSS risk. The model was deployed as a web-based clinical tool. The RF-based model effectively stratifies PSS risk in thrombolysis-treated AIS patients using accessible clinical variables. SHAP interpretability underscores fasting glucose, serum sodium/calcium, and age as pivotal predictors, offering actionable insights for prevention and personalized care. This tool may aid early intervention strategies to mitigate PSS burden.