Predicting future suicidal behaviour in young adults, with different machine learning techniques: A population-based longitudinal study

Kasper van Mens, C. W.M. de Schepper, Ben Wijnen, Saskia J. Koldijk, Hugo Schnack, Peter de Looff, Joran Lokkerbol, Karen Wetherall, Seonaid Cleare, Rory C O'Connor, Derek de Beurs*

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review


Background: The predictive accuracy of suicidal behaviour has not improved over the last decades. We aimed to explore the potential of machine learning to predict future suicidal behaviour using population-based longitudinal data. Method: Baseline risk data assessed within the Scottish wellbeing study, in which 3508 young adults (18–34 years) completed a battery of psychological measures, were used to predict both suicide ideation and suicide attempts at one-year follow-up. The performance of the following algorithms was compared: regular logistic regression, K-nearest neighbors, classification tree, random forests, gradient boosting and support vector machine. Results: At one year follow up, 2428 respondents (71%) finished the second assessment. 336 respondents (14%) reported suicide ideation between baseline and follow up, and 50 (2%) reported a suicide attempt. All performance metrics were highly similar across methods. The random forest algorithm was the best algorithm to predict suicide ideation (AUC 0.83, PPV 0.52, BA 0.74) and the gradient boosting to predict suicide attempt (AUC 0.80, PPV 0.10, BA 0.69). Limitations: The number of respondents with suicidal behaviour at follow up was small. We only had data on psychological risk factors, limiting the potential of the more complex machine learning algorithms to outperform regular logistical regression. Conclusions: When applied to population-based longitudinal data containing multiple psychological measurements, machine learning techniques did not significantly improve the predictive accuracy of suicidal behaviour. Adding more detailed data on for example employment, education or previous health care uptake, might result in better performance of machine learning over regular logistical regression.

Original languageEnglish
Pages (from-to)169-177
Number of pages9
JournalJournal of Affective Disorders
Publication statusPublished - 15 Jun 2020


  • Humans
  • Logistic Models
  • Longitudinal Studies
  • Machine Learning
  • Suicidal Ideation
  • Suicide, Attempted
  • Young Adult


Dive into the research topics of 'Predicting future suicidal behaviour in young adults, with different machine learning techniques: A population-based longitudinal study'. Together they form a unique fingerprint.

Cite this