Related Experiment Video
Updated: Jul 9, 2026

Closed-Loop Neurostimulation for Biomarker-Driven, Personalized Treatment of Major Depressive Disorder
Published on: July 7, 2023
Diagnostic Differentiation Between Unipolar and Bipolar Depression: A Machine Learning Analysis of Demographic and
Lishan Ren1, Youdan Wei1, Mingjian Cai1
1Affiliated Mental Health Centre & Hangzhou Seventh People's Hospital, Zhejiang University School of Medicine, 310013 Hangzhou, Zhejiang, China.
Background:
Differentiating between bipolar depression (BD) and unipolar depression (UD) presents a significant clinical challenge. Identifying the potential clinical features that distinguish between these two disorders is essential for optimizing personalized management strategies for individuals with depression. In this study, we employed machine learning to develop a classification model to distinguish between BD and UD based on demographic and clinical features.
Methods:
Patients with either BD or UD were included in this study. Three machine learning classifiers, including logistic regression (LR), random forest (RF), and support vector machine (SVM) were developed and compared using a dual evaluation strategy: (i) nested stratified cross-validation (5-fold outer, 3-fold inner) for unbiased model comparison; and (ii) an independent stratified hold-out split for final validation. In the latter phase, hyperparameters were optimized on the training set via grid search, with performance reported on the test set using bootstrapped 95% confidence intervals. Shapley Additive Explanations (SHAP) analysis was applied to the optimal model to elucidate feature importance.
Results:
A total of 449 patients (239 UD and 210 BD) were included. All three models achieved a consistent area under the receiver operating characteristic curve (ROC-AUC) of approximately 0.78, indicating moderate discriminative capacity, with the RF model demonstrating a more balanced error distribution. The top six predictive features were: family history, age, sleep disturbance (Patient Health Questionnaire-9 [PHQ9] item 3), fatigue (PHQ9 item 4), use of sleep medication (Pittsburgh Sleep Quality Index [PSQI] item 6), and suicidal ideation (PHQ9 item 9). The SHAP analysis suggested that younger age, "uncertain/unknown" family history, and the use of sleep medication tended to push predictions toward BD, whereas suicidal ideation, sleep disturbance, and fatigue tended to push predictions toward UD.
Conclusions:
Our machine learning approach identified key predictors-including age, family history, and sleep-related symptoms-to differentiate UD from BD in adolescent and young adult patients. Although achieving moderate accuracy, the model may serve as a supportive screening tool to enhance clinical decision-making.
Related Concept Videos
Bipolar Disorder
Depressive Disorders: Etiology
Biological Factors in Depression
Biological predispositions significantly influence the risk of developing depressive disorders. Genetic studies highlight the role of variations in the serotonin transporter...
Depression: Overview
Diagnostic and Statistical Manual of Mental Disorders (DSM)