A novel interpretable machine learning framework for predicting postpartum depression: a SHAP-based analysis of
Feng Lv1,2, Shufang Li1,2, Xiang Yuan3
1Department of Anesthesiology, Maternity and Child Health Care of Guangxi Zhuang Autonomous Region, Nanning, China.
Background:
Postpartum depression (PPD) affects nearly 20% of women globally. Conventional regression models often have limited predictive accuracy.
Objective:
This study aimed to create and test a machine learning model for predicting PPD using comprehensive infant and maternal health indicators.
Methods:
In this prospective study, 273 postpartum women were enrolled, and data on 44 demographic, obstetric, and clinical variables were collected. After 1:2 propensity-score matching, participants were divided (7:3) into training and validation sets. Feature selection was executed using the least absolute shrinkage and selection operator (LASSO) regression. Nine machine learning algorithms were compared, including random forest, gradient boosting, support vector machines, and logistic regression. The Area Under Curve (AUC), calibration, and decision-curve analyses were employed to determine the performance of the model. The Shapley Additive exPlanations (SHAP) was utilized to explore model interpretability.
Results:
LASSO regression identified four key predictors of PPD: unplanned mode of delivery, premature rupture of membranes, NRS pain score at 10 cm cervical dilation, and socioeconomic subclass. Among the nine models tested, the random forest model exhibited superior overall performance, achieving an AUC of 0.952 in the training set and 0.745 in the hold-out validation set. SHAP analysis revealed that unplanned delivery and high intrapartum pain were the strongest positive contributors to PPD risk, while higher socioeconomic status served as a protective factor.
Conclusion:
The interpretable random-forest model, which integrates explainable artificial intelligence with obstetric data, accurately predicted PPD six weeks postpartum. It provides a practical tool for individualized screening and early intervention. Future multicenter studies that incorporate biological and psychosocial markers are needed to improve generalizability and applicability.
