A machine learning-based framework for predicting postpartum chronic pain: a retrospective study
- PMID: 40247305
- PMCID: PMC12007194
- DOI: 10.1186/s12911-025-03004-9
A machine learning-based framework for predicting postpartum chronic pain: a retrospective study
Abstract
Background: Postpartum chronic pain is prevalent, affecting many women after delivery. Machine learning algorithms have been widely used in predicting postoperative conditions. We investigated the prevalence of and risk factors for postpartum chronic pain, and aimed to develop a machine learning model for its prediction.
Methods: Pregnant women in our tertiary hospital were screened from July 2021 to June 2022. Postoperative pain intensity was assessed using the numerical rating scale at 1, 3, and 6 months after delivery. Six machine learning algorithms were benchmarked using the nested resampling method, and their performance was evaluated based on classification error (CE). The algorithm with the best performance evaluation was used to establish the model for predicting chronic pain 6 months after delivery. Shapley additive explanations analysis was used to assess the contribution of each variable to the model.
Results: A total of 1,398 postpartum women were included for analysis, among whom 383 developed chronic pain 6 months after delivery. The least absolute shrinkage selection operator identified five relevant factors: numerical rating scale at 3 days after delivery, body mass index before delivery, newborn weight, multiparous delivery, and back pain during gestation. The CEs for the algorithms were as follows: K-nearest neighbor, 0.212; logistic regression, 0.342; linear discriminant analysis, 0.343; naive Bayes, 0.346; ranger, 0.219; and extreme gradient boosting model, 0.147. The extreme gradient boosting model exhibited the best performance (CE = 0.147, F1 = 0.851) and was selected for model establishment. Visualization using Shapley additive explanations facilitated the interpretation of the influence of the five variables in the model.
Conclusions: The extreme gradient boosting algorithm, which incorporates five risk factors, demonstrated strong performance in predicting postpartum chronic pain.
Trial registration: https//www.chictr.org.cn/ (ChiCTR2300070514).
Keywords: Cesarean delivery; Machine learning; Pain; Pregnancy.
© 2025. The Author(s).
Conflict of interest statement
Declarations. Ethics approval and consent to participate: This study was approved by the Ethics Committee of Xiangyang Central Hospital. All study procedures were performed in accordance with the Declaration of Helsinki. The Ethics Committee of the Xiangyang Central Hospital provided an exempt determination and waived the requirement for informed consent. Consent for publication: Not applicable. Competing interests: The authors declare no competing interests.
Figures




Similar articles
-
Interpretable Machine Learning Model for Predicting Postpartum Depression: Retrospective Study.JMIR Med Inform. 2025 Jan 20;13:e58649. doi: 10.2196/58649. JMIR Med Inform. 2025. PMID: 39864955 Free PMC article.
-
A risk prediction model based on machine learning algorithm for parastomal hernia after permanent colostomy.BMC Med Inform Decis Mak. 2024 Aug 8;24(1):224. doi: 10.1186/s12911-024-02627-8. BMC Med Inform Decis Mak. 2024. PMID: 39118122 Free PMC article.
-
Machine learning-based prediction of postpartum hemorrhage after vaginal delivery: combining bleeding high risk factors and uterine contraction curve.Arch Gynecol Obstet. 2022 Oct;306(4):1015-1025. doi: 10.1007/s00404-021-06377-0. Epub 2022 Feb 16. Arch Gynecol Obstet. 2022. PMID: 35171347
-
Application and interpretation of machine learning models in predicting the risk of severe obstructive sleep apnea in adults.BMC Med Inform Decis Mak. 2023 Oct 19;23(1):230. doi: 10.1186/s12911-023-02331-z. BMC Med Inform Decis Mak. 2023. PMID: 37858225 Free PMC article.
-
Interpretable machine learning model to predict surgical difficulty in laparoscopic resection for rectal cancer.Front Oncol. 2024 Feb 6;14:1337219. doi: 10.3389/fonc.2024.1337219. eCollection 2024. Front Oncol. 2024. PMID: 38380369 Free PMC article. Review.
References
-
- Haddad-Tóvolli R, Claret M. Metabolic and feeding adjustments during pregnancy. Nat Rev Endocrinol. 2023;19(10):564–80. - PubMed
-
- Munro A, George RB, Chorney J, Snelgrove-Clarke E, Rosen NO. Prevalence and predictors of chronic pain in pregnancy and postpartum. J Obstet Gynaecol Ca. 2017;39(9):734–41. - PubMed
-
- Yimer H, Woldie H. Incidence and associated factors of chronic pain after caesarean section: A systematic review. J Obstet Gynaecol Ca. 2019;41(6):840–54. - PubMed
-
- Wang X, Wang Y, Zhou S, Wang J, Wang J, Lofstedt P. Women’s postpartum practices and chronic pain in rural China. Matern Child Hlth J. 2009;13(2):206–12. - PubMed
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Medical