AUTHOR=Li Ying , Pan Chuang , Gu Yue TITLE=Using machine learning methods to predict post-traumatic stress disorder in stroke patients in China JOURNAL=Frontiers in Psychiatry VOLUME=Volume 16 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/psychiatry/articles/10.3389/fpsyt.2025.1694654 DOI=10.3389/fpsyt.2025.1694654 ISSN=1664-0640 ABSTRACT=BackgroundThis 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.MethodsA 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.ResultsThe 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).ConclusionThe 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.