Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Psychiatry

Sec. Anxiety and Stress Disorders

Using machine learning methods to predict post-traumatic stress disorder in stroke patients in China

Provisionally accepted
Ying  LiYing Li1*Chuang  PanChuang Pan2Yue  GuYue Gu3
  • 1Jishou University, Jishou, China
  • 2Guilin Medical University, Guilin, China
  • 3The Affiliated Taizhou People's Hospital of Nanjing Medical University, Taizhou, China

The final, formatted version of the article will be published soon.

Background: This study aims to utilize various machine learning algorithms to construct a risk prediction model for post-stroke Post-Traumatic Stress Disorder (PTSD), select the optimal model, and identify risk factors. Methods: A total of 249 stroke patients from two tertiary hospitals in Jiangsu Province and Shandong Province were selected and randomly divided into the training group and the validation group. Based on the results of Logistic regression analysis, a risk prediction model for PTSD after stroke was constructed by using Logistic regression, Random forest (RF) and K-nearest neighbor algorithm, and further verification was conducted according to the best algorithm. Results: The incidence of PTSD in stroke patients was 40.56%, and the RF model was the best. Feature importance ranking shows that the factors affecting PTSD in stroke patients are: Stroke type (0.187), Sleep in the last three months (0.152), Way of hospitalization (0.147), Monthly household income (0.133), Hypertension (0.108), Gender (1.104), Marital status (0.079), Physical exercise situation (0.067), and Educational background (0.023). Conclusion: The model based on the RF algorithm has the best predictive performance, and the factors affecting PTSD in stroke patients include stroke type, gender, Way of hospitalization, Sleep in the last three months, Physical exercise situation, Hypertension, etc. The results of this study can assist clinical medical staff to screen high-risk groups of PTSD after stroke and provide the basis for early implementation of targeted preventive measures.

Keywords: Stroke, Post-traumatic stress disorder, random forest, Prediction model, machine learning, Risk factors

Received: 28 Aug 2025; Accepted: 04 Nov 2025.

Copyright: © 2025 Li, Pan and Gu. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Ying Li, 1784570921@qq.com

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.