Related Experiment Video
Updated: May 2, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Construction and verification of risk prediction model for suicidal attempts of mood disorder based on machine
Yannan Deng1, Jinhe Zhang1, Xinyu Liu2
1The National Clinical Research Center for Mental Disorders & Beijing Key Laboratory of Mental Disorders, Beijing Anding Hospital, Capital Medical University, Beijing, China; Advanced Innovation Center for Human Brain Protection, Capital Medical University, Beijing, China.
Background:
Mood disorders (MD) are closely related to suicide attempt (SA). Developing an effective prediction model for SA in MD patients could play a crucial role in the early identification of high-risk groups.
Methods:
1099 patients with MD were collected to Model construction. 387 MD patients were enrolled for external validate. The least absolute shrinkage and selection operator (LASSO) regression was used to screen features that may be related to SA as predictors. Ten machine learning algorithms were applied to the training set to construct the SA prediction model. The machine learning model with the best sensitivity and stability was selected according to AUC, F1 score, accuracy and other indicators. The locally explanatory technique of Shapley Additive Explanations (SHAP) was used to rank and interpret the importance of features collected in best model to analyze the potential impact of each feature on SA. Meanwhile, to further validate the stability of the model, the sensitivity analysis utilizing k-fold cross-validation and external validate in another center were performed.
Results:
This study incorporates 8 features. Prediction models was constructed based on 10 different machine learning methods. The results showed that the prediction model constructed by Random Forest (RF) method had good discriminant ability and stability (AUC of Testing = 0.741, AUC of Training = 0.786, AUC of validation = 0.788) and acceptable discriminant. Further, the prediction model showed that the most valuable features for predicting SA were Polarity and previous SA.
Conclusion:
The RF method can better construct the risk prediction model of SA in MD patients.

