Hostname: page-component-6b88cc9666-27988 Total loading time: 0 Render date: 2026-02-17T05:31:42.038Z Has data issue: false hasContentIssue false
Accepted manuscript

Predicting the need for electroconvulsive therapy via machine learning trained on electronic health record data

Published online by Cambridge University Press:  13 February 2026

Lasse Hansen
Affiliation:
Department of Clinical Medicine, Aarhus University, Aarhus, Denmark Department of Affective Disorders, Aarhus University Hospital - Psychiatry, Aarhus, Denmark Center for Humanities Computing, Aarhus University, Aarhus, Denmark
Jakob Grøhn Damgaard
Affiliation:
Department of Clinical Medicine, Aarhus University, Aarhus, Denmark Department of Affective Disorders, Aarhus University Hospital - Psychiatry, Aarhus, Denmark Center for Humanities Computing, Aarhus University, Aarhus, Denmark
Robert M. Lundin
Affiliation:
Deakin University, Institute for Mental and Physical Health and Clinical Translation (IMPACT), Geelong, Victoria, Australia Mildura Base Public Hospital, Mental Health Services, Alcohol and Other Drugs Integrated Treatment Team, Mildura, Victoria, Australia Barwon Health, Drugs and Alcohol Services, Mental Health Drugs and Alcohol Services, Geelong, Victoria, Australia
Andreas Aalkjær Danielsen
Affiliation:
Department of Clinical Medicine, Aarhus University, Aarhus, Denmark Department of Affective Disorders, Aarhus University Hospital - Psychiatry, Aarhus, Denmark Psychosis Research Unit, Aarhus University Hospital - Psychiatry, Aarhus, Denmark
Søren Dinesen Østergaard*
Affiliation:
Department of Clinical Medicine, Aarhus University, Aarhus, Denmark Department of Affective Disorders, Aarhus University Hospital - Psychiatry, Aarhus, Denmark Deakin University, Institute for Mental and Physical Health and Clinical Translation (IMPACT), Geelong, Victoria, Australia
*
Corresponding author: Søren Dinesen Østergaard, MD PhD, Deakin University, Institute for Mental and Physical Health and Clinical Translation (IMPACT), Geelong (Victoria), Australia, Email: s.ostergaard@deakin.edu.au
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.
Objectives:

Electroconvulsive therapy (ECT) is an effective treatment of severe manifestations of mental illness. Since delay in initiation of ECT can have detrimental effects, prediction of the need for ECT could improve outcomes via more timely treatment initiation. Therefore, this study aimed to predict the need for ECT following admission to a psychiatric hospital.

Methods:

This study was based on electronic health record (EHR) data from routine clinical practice. Adult patients admitted to a hospital within the Psychiatric Services of the Central Denmark Region between January 2013 and November 2021 were included in the study. The outcome was initiation of ECT >7 days (to not include patients admitted for planned ECT) and ≤67 days after admission. The data was randomly split into an 85% training set and a 15% test set. On the 7th day of the inpatient stay, machine learning models (extreme gradient boosting) were trained to predict initiation of ECT and subsequently tested on the test set.

Results:

The cohort consisted of 41,610 patients with 164,961 admissions. In the held out test set, the trained model predicted ECT initiation with an area under the receiver operating characteristic curve of 0.94, 47% sensitivity, 98% specificity, positive predictive value of 24% and negative predictive value of 99%. The top predictors were the highest suicide assessment score and mean Brøset violence checklist score in the preceding three months.

Conclusions:

EHR data from routine clinical practice may be used to predict need for ECT. This may lead to more timely treatment initiation.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of Scandinavian College of Neuropsychopharmacology