Related Experiment Videos
Development and external validation of an explainable XGBoost model with a web-based calculator for risk prediction
Qian Zhang1, Fang Wu2, Mei Zhu1
1Department of Obstetrics and Gynecology, the Second People's Hospital of Bengbu City, Bengbu, China.
Introduction:
Postpartum depression (PPD) is associated with severe adverse outcomes, yet timely risk stratification remains challenging. Existing machine learning models are often limited by insufficient external validation, limited interpretability, and lack of accessible clinical tools. This study aimed to develop and externally validate an explainable machine learning model with a web-based calculator for predicting postpartum depressive symptoms.
Methods:
This retrospective cohort study included 553 women from two hospitals, comprising 403 in the development cohort and 150 in an independent external validation cohort. The development cohort was divided into training and internal test sets. Screening-positive postpartum depressive symptoms at 6 weeks postpartum were defined as an Edinburgh Postnatal Depression Scale (EPDS) score ≥9. Five machine learning models were developed using demographic, psychosocial, and obstetric predictors. Model discrimination was assessed using the area under the receiver operating characteristic curve (AUC), with calibration and decision curve analyses performed additionally. SHapley Additive exPlanations (SHAP) were used for model interpretation.
Results:
Screening-positive rates were 38.0% in the development cohort and 26.0% in the external validation cohort. Tree-based ensemble models showed broadly comparable performance. eXtreme Gradient Boosting (XGBoost) was selected based on its numerically highest mean cross-validated AUC and balanced overall performance, with AUCs of 0.895 ± 0.033 in cross-validation, 0.845 (95% confidence interval [CI]: 0.751-0.940) in the internal test set, and 0.820 (95% CI: 0.743-0.889) in the external validation cohort. Calibration was acceptable in the internal test set, whereas absolute risk was overestimated in the external validation cohort. Decision curve analysis indicated potential net clinical benefit. SHAP identified age, marital relationship quality, prenatal depressive symptoms, monthly personal income, and sleep disturbance as important model-based contributors. A four-predictor web calculator was developed.
Discussion:
The explainable XGBoost model showed promising discrimination for predicting EPDS-defined postpartum depressive symptoms. However, given the modest external validation sample and evidence of risk overestimation, further prospective multicenter validation and recalibration are needed before routine clinical implementation.