Abstract
Objective Post-stroke epilepsy (PSE) is a major complication that worsens both prognosis and quality of life in patients with ischemic stroke. This study aims to develop an interpretable machine learning model to predict PSE using medical records from four hospitals in Chongqing.
Methods We collected and analyzed medical records, imaging reports, and laboratory test results from 21,459 patients diagnosed with ischemic stroke. Traditional univariable and multivariable statistical analyses were performed to identify key predictive factors. The dataset was divided into a 70% training set and a 30% testing set. To address class imbalance, the Synthetic Minority Oversampling Technique combined with Edited Nearest Neighbors was used. Nine widely applied machine learning algorithms were evaluated and compared using relevant prediction metrics. SHAP (SHapley Additive exPlanations) was used to interpret the model, assessing the contributions of different features.
Results Regression analyses showed that complications such as hydrocephalus, cerebral hernia, and deep vein thrombosis, as well as brain regions (frontal, parietal, and temporal lobes), significantly contributed to PSE. Factors like age, gender, NIH Stroke Scale (NIHSS) scores, and laboratory results such as WBC count and D-dimer levels were associated with a higher risk of PSE. Among the machine learning models, tree-based methods such as Random Forest, XGBoost, and LightGBM demonstrated strong predictive performance, achieving an AUC of 0.99.
Conclusion Our model successfully predicts PSE risk, with tree-based models showing superior performance. The NIHSS score, WBC count, and D-dimer were identified as the most important predictors.
Competing Interest Statement
The authors have declared no competing interest.
Funding Statement
The research is funded by Based on artificial intelligence and multiple omics technology set up a system of auxiliary cardiovascular disease diagnosis and treatment(2023CDJYGRH-ZD06);by Emergency medicine Key laboratory of Chongqing Joint Fund for Talent Innovation and development(2024RCCX10),by Brain-like intelligence research Key laboratory of chongqing Education Commission(BIR2019004)
Author Declarations
I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.
Yes
The details of the IRB/oversight body that provided approval or exemption for the research described are given below:
The study protocol was approved by the Ethics Committees of Chongqing University Center Hospital, Chongqing University Qianjiang Central Hospital, Bishan District People's Hospital, and Yubei Traditional Chinese Medicine Hospital.
I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.
Yes
I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).
Yes
I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.
Yes
Footnotes
We have enhanced the codes and methods of the machine learning procedure.
We have revised the draft to make the descriptions more clear and concise than before.
Data availability statement
The codes,models,analysis results was uploaded at https://github.com/conanan/lasso-ml. The full dataset can be provided for researchers if needed by the corresponding author.