Related Experiment Video
Updated: Aug 27, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Prediction of depression risk in chronic kidney disease using PSO-optimized random forest: a web-based application
Siyu Li1, Xianhua Wang1, Jiangli Hu1
1Sichuan Provincial Center for Mental Health, Sichuan Provincial People's Hospital, School of Medicine, University of Electronic Science and Technology of China, Chengdu, China.
Background:
Depression is a prevalent psychological issue among chronic kidney disease (CKD) patients. Such symptoms can greatly affect the physical and mental health and life expectancy of middle-aged and older persons with CKD.
Objective:
The aim of this study is to develop a depression risk prediction model for CKD patients, laying the scientific groundwork for early intervention.
Methods:
This research utilized data from the 2015 China Health and Retirement Longitudinal Study (CHARLS), a dataset representative of the Chinese population. The study examined 52 indicators, encompassing socio-demographic variables, behavioral factors, health status, and psychological health parameters. Statistical analysis was performed using SPSS 26.0 and Python. LASSO regression was employed to identify independent predictors of depression risk in patients with CKD. Subsequently, a random forest model was selected to construct the depression risk prediction model based on these predictors, followed by model validation. The model was assessed using accuracy, recall, specificity, F1 score, Area Under Curve (AUC) value, and clinical decision curves. A particle swarm optimization (PSO) algorithm from intelligent optimization algorithms was applied to fine-tune the model's hyperparameters, which were then compared against the unoptimized random forest algorithm.
Results:
The final analysis included 734 CKD patients from the CHARLS database. A total of 326(44.4%) CKD patients exhibited depressive symptoms. The findings revealed that gender, household registration, place of residence, self-rated health, arthritis, stomach disease, height, life satisfaction, glycated hemoglobin, educational level, instrumental activities of daily living (IADL), and pain are predictive factors for depression in CKD patients. These factors were used to construct the PSO-random forest model, which demonstrated good consistency and accuracy. The predictive model achieved an AUC value of 0.820.
Conclusion:
This study presents a reliable PSO-random forest model for predicting depression risk in CKD patients, leveraging CHARLS data and interpretable features. This tool presents a valuable means of early screening and delivering personalized care, with the potential to significantly improve mental health outcomes within this population.