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
References
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Medical
