Objective
Depression has emerged as a global public health concern with high incidence and disability rates, which are timely imperative to identify and intervene in clinical practice. The objective of this study was to explore the association between heart rate variability (HRV) and depression, with the aim of establishing and validating machine learning models for the auxiliary diagnosis of depression.
Methods
The data of 465 outpatients from the Affiliated Hospital of Southwest Medical University were selected for the study. The study population was then randomly divided into training and test sets in a 7:3 ratio. Logistic regression (LR), support vector machine (SVM), random forest (RF) and eXtreme gradient boosting (XGBoost) algorithm models were used to construct risk prediction models in the training set, and the model performance was verified in the test set. The four models were evaluated by the area under the receiver operating characteristic curve (ROC), calibration curve and the decision curve analysis (DCA). Furthermore, we employed the SHapley Additive exPlanations (SHAP) method to illustrate the effects of the features attributed to the model.
Results
There were 237 people in the depressed group and 228 in the non-depressed group. In the training set (
n
= 325) and test set (
n
= 140), the area under of the curve(AUC) values of the XGBoost model are 0.92 [95% confidence interval (CI) 0.888,0.95] and 0.82 (95% CI 0.754,0.892)] respectively, which are higher than the other three models. The XGBoost model has excellent predictive efficacy and clinical utility. The SHAP method was ranked according to the importance of the degree of influence on the model, with age, heart rate, Standard deviation of the NN intervals (SDNN), two nonlinear parameters of HRV and sex considered to be the top 6 predictors.
Conclusion
We provided a feasibility study of HRV as a potential biomarker for depression. The proposed model based on HRV provides clinicians with a quantitative auxiliary diagnostic tool, which is assist to improving the accuracy and efficiency of depression diagnosis, and can also be utilized for the monitoring and prevention of depression.
Supplementary Information
The online version contains supplementary material available at 10.1186/s12888-024-06384-w.