Development and Internal Evaluation of an Interpretable Psychometric Classification Algorithm for Mental Disorders and Suicide Risk in Psychiatric Inpatients

Authors

  • Diego Diaz-Milanes Department of Quantitative Methods, Universidad Loyola Andalucía, 41704 Dos Hermanas, Seville, Spain; Health Research Institute, University of Canberra, 2617 Bruce, Australian Capital Territory, Australia https://orcid.org/0000-0001-9123-2306
  • Ana Garcia-Megias Department of Quantitative Methods, Universidad Loyola Andalucía, 41704 Dos Hermanas, Seville, Spain https://orcid.org/0009-0003-6272-1663
  • Carmen Santin Vilariño Department of Clinical and Experimental Psychology, University of Huelva, 21007 Huelva, Huelva, Spain https://orcid.org/0000-0001-9842-0326
  • Raquel Remesal-Cobreros Department of Clinical and Experimental Psychology, University of Huelva, 21007 Huelva, Huelva, Spain; Mental Health Inpatient Unit, Juan Ramón Jiménez Hospital, Andalusian Health Service, 21005 Huelva, Huelva, Spain https://orcid.org/0000-0002-8732-4563

DOI:

https://doi.org/10.62641/aep.2447

Keywords:

suicide, mental disorders, machine learning, decision trees, psychometrics

Abstract

Background: Mental disorders (MDs) and suicide risk represent major challenges for mental healthcare. Although several psychometric instruments are available for clinical assessment, their isolated use may provide limited support for differentiating clinically relevant profiles. Interpretable machine-learning approaches may help integrate psychometric information and support preliminary classification in mental health settings. This study aimed to develop and internally evaluate a preliminary, interpretable classification algorithm based on psychometric measures to distinguish among individuals without associated psychopathology, psychiatric inpatients with MD without suicide risk, and psychiatric inpatients with MD and suicide risk.

Methods: The sample included 175 participants aged 18–76 years, distributed into three groups: control group (n = 58), MD without suicide risk group (n = 59), and MD with suicide risk group (n = 58). Clinical participants were recruited from an acute psychiatric inpatient unit. A Radom Forest model was used for feature selection, and the selected predictors were entered into a Classification and Regression Trees (CART) decision tree using the Gini index as the splitting criterion. Model performance was internally evaluated using a 70/30 train-test split, with performance assessed globally and for each outcome category. Performance metrics included overall accuracy, Cohen’s kappa, area under the receiver operating characteristic curve (AUC-ROC), sensitivity, specificity, balanced accuracy, precision, and F1-score.

Results: The Random Forest procedure identified depression, psychoticism, openness to experience, anxiety, and state anger as the most relevant predictors. The final CART model retained three variables: depression, openness to experience, and psychoticism. Overall accuracy was 0.68, and Cohen’s kappa was 0.53, indicating moderate classification agreement. Class-specific AUC-ROC values were 0.78 for the control group, 0.65 for the MD without suicide risk group, and 0.83 for the MD with suicide risk group. Sensitivity was 0.71, 0.50, and 0.83, respectively, and specificity was 0.83, 0.92, and 0.77, respectively.

Conclusions: The proposed decision tree provides a preliminary and interpretable psychometric classification model for differentiating individuals without associated psychopathology from acute psychiatric inpatients with MD with or withoutsuicide risk. The modelshowed moderate overall classification performance, with better discrimination for suicide risk than for MD without suicide risk. These findings represent preliminary evidence of classification performance within the study population and should not be interpreted as evidence of clinical utility or immediate implementation. External evaluation in larger and more diverse samples, including primary-care and community populations, is required before considering broader clinical application. 

Published

2026-11-25

How to Cite

Diaz-Milanes, Diego, et al. “Development and Internal Evaluation of an Interpretable Psychometric Classification Algorithm for Mental Disorders and Suicide Risk in Psychiatric Inpatients”. Actas Españolas De Psiquiatría, Nov. 2026, pp. 1-14, doi:10.62641/aep.2447.

Issue

Section

Article