Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 May 1;82(5):459-469.
doi: 10.1001/jamapsychiatry.2024.4702.

Predicting Diagnostic Progression to Schizophrenia or Bipolar Disorder via Machine Learning

Affiliations

Predicting Diagnostic Progression to Schizophrenia or Bipolar Disorder via Machine Learning

Lasse Hansen et al. JAMA Psychiatry. .

Abstract

Importance: The diagnosis of schizophrenia and bipolar disorder is often delayed several years despite illness typically emerging in late adolescence or early adulthood, which impedes initiation of targeted treatment.

Objective: To investigate whether machine learning models trained on routine clinical data from electronic health records (EHRs) can predict diagnostic progression to schizophrenia or bipolar disorder among patients undergoing treatment in psychiatric services for other mental illness.

Design, setting, and participants: This cohort study was based on data from EHRs from the Psychiatric Services of the Central Denmark Region. All patients aged 15 to 60 years with at least 2 contacts (at least 3 months apart) with the Psychiatric Services of the Central Denmark Region between January 1, 2013, and November 21, 2016, were included. Analysis occurred from December 2022 to November 2024.

Exposures: Predictors based on EHR data, including medications, diagnoses, and clinical notes.

Main outcomes and measures: Diagnostic transition to schizophrenia or bipolar disorder within 5 years, predicted 1 day before outpatient contacts by means of elastic net regularized logistic regression and extreme gradient boosting (XGBoost) models. The area under the receiver operating characteristic curve (AUROC) was used to determine the best performing model.

Results: The study included 24 449 patients (median [Q1-Q3] age at time of prediction, 32.2 [24.2-42.5] years; 13 843 female [56.6%]) and 398 922 outpatient contacts. Transition to the first occurrence of either schizophrenia or bipolar disorder was predicted by the XGBoost model, with an AUROC of 0.70 (95% CI, 0.70-0.70) on the training set and 0.64 (95% CI, 0.63-0.65) on the test set, which consisted of 2 held-out hospital sites. At a predicted positive rate of 4%, the XGBoost model had a sensitivity of 9.3%, a specificity of 96.3%, and a positive predictive value (PPV) of 13.0%. Predicting schizophrenia separately yielded better performance (AUROC, 0.80; 95% CI, 0.79-0.81; sensitivity, 19.4%; specificity, 96.3%; PPV, 10.8%) than was the case for bipolar disorder (AUROC, 0.62, 95% CI, 0.61-0.63; sensitivity, 9.9%; specificity, 96.2%; PPV, 8.4%). Clinical notes proved particularly informative for prediction.

Conclusions and relevance: These findings suggest that it is possible to predict diagnostic transition to schizophrenia and bipolar disorder from routine clinical data extracted from EHRs, with schizophrenia being notably easier to predict than bipolar disorder.

PubMed Disclaimer

Conflict of interest statement

Conflict of Interest Disclosures: Dr Danielsen reported receiving personal fees from Otsuka Pharma Scandinavia AB outside the submitted work. Dr Østergaard reported receiving grants from The Novo Nordisk Foundation (grant No. NNF20SA0062874), The Lundbeck Foundation (grant No. R358-2020-2341), and Independent Research Fund Denmark (grant Nos. 7016-00048B and 2096-00055A); receiving the 2020 Lundbeck Foundation Young Investigator Prize; owning or having owned units of mutual funds with stock tickers DKIGI, IAIMWC, SPIC25KL and WEKAFKI; and owning or having owned units of exchange traded funds with stock tickers BATE, TRET, QDV5, QDVH, QDVE, SADM, IQQH, USPY, EXH2, 2B76, IS4S, OM3X and EUNL outside the submitted work. No other disclosures were reported.

References

    1. Goldman ML, Pincus HA, Mangurian C. Schizophrenia. N Engl J Med. 2020;382(6):583-584. doi: 10.1056/NEJMc1915943 - DOI - PubMed
    1. Vieta E, Berk M, Schulze TG, et al. Bipolar disorders. Nat Rev Dis Primers. 2018;4:18008. doi: 10.1038/nrdp.2018.8 - DOI - PubMed
    1. Laursen TM, Wahlbeck K, Hällgren J, et al. Life expectancy and death by diseases of the circulatory system in patients with bipolar disorder or schizophrenia in the Nordic countries. PLoS One. 2013;8(6):e67133. doi: 10.1371/journal.pone.0067133 - DOI - PMC - PubMed
    1. Altamura AC, Buoli M, Caldiroli A, et al. Misdiagnosis, duration of untreated illness (DUI) and outcome in bipolar patients with psychotic symptoms: a naturalistic study. J Affect Disord. 2015;182:70-75. doi: 10.1016/j.jad.2015.04.024 - DOI - PubMed
    1. Penttilä M, Jääskeläinen E, Hirvonen N, Isohanni M, Miettunen J. Duration of untreated psychosis as predictor of long-term outcome in schizophrenia: systematic review and meta-analysis. Br J Psychiatry. 2014;205(2):88-94. doi: 10.1192/bjp.bp.113.127753 - DOI - PubMed