AUTHOR=Huang Xudong , Zhang Lifeng , Zhang Chenyang , Li Jing , Li Chenyang TITLE=Postpartum depression risk prediction using explainable machine learning algorithms JOURNAL=Frontiers in Medicine VOLUME=Volume 12 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/medicine/articles/10.3389/fmed.2025.1565374 DOI=10.3389/fmed.2025.1565374 ISSN=2296-858X ABSTRACT=ObjectivePostpartum depression (PPD) is a common and serious mental health complication after childbirth, with potential negative consequences for both the mother and her infant. This study aimed to develop an explainable machine learning model to predict the risk of PPD and to identify its key predictive factors.MethodsA retrospective analysis was conducted on 1,065 women who attended their 6-week postpartum follow-up visit at a tertiary maternal and child healthcare hospital in Shenyang, China, from January to December 2021. Feature selection was performed using LASSO regression and the Boruta algorithm. Eight machine learning algorithms were then employed to construct the prediction models. Model performance was evaluated according to the area under the receiver operator characteristic curve (AUC), sensitivity, specificity, recall, F1 score, and accuracy. Shapley additive explanations (SHAP) were used to visualize the features of the model and individual case predictions.ResultsAmong the 1,065 women, 251 (23.5%) developed PPD. An 11-variable prediction model was developed, with XGBoost showing the best performance on both training and validation sets. After optimizing the model parameters and applying 10-fold cross-validation, the model achieved an average accuracy of 0.95, an average AUC of 0.955, average precision of 0.945, and average specificity of 0.985, indicating excellent predictive performance. The key predictive factors included weight gain during pregnancy, relationship with the mother-in-law, sleep quality, marital relationship, planned pregnancy, fetal sex preference, pregnancy-related anxiety, pelvic-floor muscle endurance, cervix status, attendance at prenatal education classes, and postpartum care satisfaction.ConclusionThe XGBoost model demonstrated optimal performance at predicting PPD and can aid healthcare professionals to identify high-risk individuals. The SHAP method enhanced the model’s interpretability, facilitating a better understanding of the causes of PPD, how to prevent it, and how to improve patient outcomes.