Building a machine learning-based risk prediction model for second-trimester miscarriage
- PMID: 39522013
- PMCID: PMC11550545
- DOI: 10.1186/s12884-024-06942-w
Building a machine learning-based risk prediction model for second-trimester miscarriage
Abstract
Background: Second-trimester miscarriage is a common adverse pregnancy outcome that imposes substantial economic and psychological pressures on both the physical and mental well-being of patients and their families. Currently, there is a scarcity of research on predictive models for the risk of second-trimester miscarriage.
Methods: Clinical data were retrospectively collected from patients who were in the second trimester of pregnancy (between 14+0 and 27+6 weeks gestation), whose main diagnosis was "threatened abortion" and who were hospitalized at the Women and Children's Hospital of Ningbo University from January 2020 to October 2023. Following preliminary data processing, the patient cohort was randomly stratified into a training cohort and a validation cohort at proportions of 70% and 30%, respectively. The Boruta algorithm and multifactor analysis were used to refine feature factors and determine the optimal features linked to second-trimester miscarriages. The imbalanced dataset from the training cohort was rectified by applying the SMOTE oversampling approach. Seven machine-learning models were built and subjected to a comprehensive analysis to validate and evaluate their predictive capabilities. Through this rigorous assessment, the optimal model was selected. Shapley additive explanations (SHAP) were generated to provide insights into the model's predictions, and a visual representation of the predictive model was built.
Results: A total of 2006 patients were included in the study; 395 (19.69%) of them had second-trimester miscarriages. XGBoost was shown to be the optimal model after a comparison of seven different models utilizing metrics such as accuracy, precision, recall, the F1 score, precision-recall average precision, the receiver operating characteristic-area under the curve, decision curve analysis, and the calibration curve. The most significant feature was cervical length, and the top ten features of second-trimester miscarriage were found using the SHAP technique based on relevance rankings.
Conclusion: The risk of a second-trimester miscarriage can be accurately predicted by the visual risk prediction model, which is based on the machine learning mentioned above.
Keywords: Machine learning; Prediction models; Second-trimester miscarriage.
© 2024. The Author(s).
Conflict of interest statement
The authors declare no competing interests.
Figures










Similar articles
-
Risk prediction model based on machine learning for predicting miscarriage among pregnant patients with immune abnormalities.Front Pharmacol. 2024 Apr 22;15:1366529. doi: 10.3389/fphar.2024.1366529. eCollection 2024. Front Pharmacol. 2024. PMID: 38711993 Free PMC article.
-
Application of machine learning algorithm for prediction of abortion among reproductive age women in Ethiopia.Sci Rep. 2025 May 23;15(1):17924. doi: 10.1038/s41598-025-95342-x. Sci Rep. 2025. PMID: 40410396 Free PMC article.
-
Embryo classification beyond pregnancy: early prediction of first trimester miscarriage using machine learning.J Assist Reprod Genet. 2023 Feb;40(2):309-322. doi: 10.1007/s10815-022-02619-5. Epub 2022 Oct 4. J Assist Reprod Genet. 2023. PMID: 36194342 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.
-
Second-trimester miscarriage: a review of postnatal investigations and subsequent pregnancy outcomes.Ir J Med Sci. 2023 Aug;192(4):1757-1760. doi: 10.1007/s11845-022-03227-z. Epub 2022 Nov 17. Ir J Med Sci. 2023. PMID: 36396810 Review.
References
-
- Bottomley C, Bourne T. Diagnosing miscarriage. Best Pract Res Clin Obstet Gynaecol. 2009;23(4):463–77. - PubMed
-
- Saraswat L, Bhattacharya S, Maheshwari A, Bhattacharya S. Maternal and perinatal outcome in women with threatened miscarriage in the first trimester: a systematic review. BJOG Int J Obstet Gynaecol. 2010;117(3):245–57. - PubMed
-
- Weiss JL, Malone FD, Vidaver J, Ball RH, Nyberg DA, Comstock CH, et al. Threatened abortion: a risk factor for poor pregnancy outcome, a population-based screening study. Am J Obstet Gynecol. 2004;190(3):745–50. - PubMed
-
- Aljameel SS, Aljabri M, Aslam N, Alomari DM, Alyahya A, Alfaris S, et al. An Automated System for Early Prediction of Miscarriage in the First Trimester Using Machine Learning. CMC-Comput Mater Continua. 2023;75(1):1291–304.
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Medical