Skip to main content
European Journal of Medical Research logoLink to European Journal of Medical Research
. 2025 Sep 3;30:838. doi: 10.1186/s40001-025-03113-1

Machine learning prediction of clinical pregnancy in endometriosis patients following fresh IVF/ICSI-ET

Xiaoju Wan 1, Min Yu 1, Xingwu Wu 1, Zhihui Huang 1, Jun Tan 1,
PMCID: PMC12406419  PMID: 40903773

Abstract

Background

Fresh embryo transfer reduces waiting time and minimizes embryo cryodamage for endometriosis (EM) patients. The current prediction models for fresh embryo transfer outcomes in EM primarily rely on logistic regression, with limited application of machine learning (ML) approaches. This study aimed to develop an ML-based predictive model for clinical pregnancy in EM patients undergoing fresh embryo transfer.

Methods

A retrospective analysis included 1752 EM patients undergoing IVF/ICSI with fresh embryo transfer (2014–2024). Twenty-four clinical and embryonic characteristics were predictors; clinical pregnancy was the outcome. Six ML models—Naïve Bayes, Logistic Regression, Random Forest, k-Nearest Neighbors, Neural Network, and eXtreme Gradient Boosting (XGBoost)—were developed and compared. Feature selection involved logistic regression and Random Forest recursive feature elimination, with tenfold cross-validation.

Results

Male age (OR = 0.96, 95% CI 0.93–0.98, p < 0.001), normal fertilization count (OR = 1.07, 95% CI 1.03–1.11, p = 0.001), and transferred embryo count (OR = 1.61, 95% CI 1.24–2.08, p < 0.001) significantly predicted clinical pregnancy. The XGBoost model demonstrated optimal performance (training AUC: 0.764; testing AUC: 0.622). Shapley Additive Explanations (SHAP) provided model interpretability.

Conclusions

An XGBoost-based model effectively predicts clinical pregnancy in EM patients after fresh embryo transfer, showing acceptable performance and interpretability.

Supplementary Information

The online version contains supplementary material available at 10.1186/s40001-025-03113-1.

Keywords: Endometriosis, Infertility, Predictive model, Clinical pregnancy, Machine learning, SHAP

Introduction

Endometriosis (EM) is a common chronic inflammation and hormone-dependent gynecological disease with an incidence of approximately 10–15% [1]. Approximately 80% of EM are accompanied by pelvic pain and 40–50% of EM are accompanied by infertility [2]. The pathogenesis of infertility caused by EM mainly includes changes in reproductive tract structure, decreased ovarian reserve, decreased endometrial receptivity, follicular dysfunction, and an abdominal inflammatory environment [35]. For EM patients with infertility who fail to conceive naturally after medication or surgery, assisted reproductive technology (ART), particularly in vitro fertilization (IVF) and intracytoplasmic sperm injection (ICSI), represents the most effective treatment [6, 7]. These techniques involve stimulating the ovaries to retrieve eggs (oocytes), fertilizing them with sperm in a laboratory setting (IVF involves mixing eggs and sperm; ICSI involves injecting a single sperm directly into an egg), culturing the resulting embryos, and subsequently transferring selected embryo(s) into the woman's uterus.

Effective prediction of ART outcomes holds significant value for both patients and clinicians. For patients, knowing the likelihood of successful birth following the demanding and costly treatment process provides crucial psychological preparation and helps set realistic expectations. For clinicians, predicting reproductive outcomes prior to treatment initiation is essential for developing personalized treatment strategies and optimizing clinical decision making to benefit patients.

Machine learning (ML) automatically analyzes and obtains patterns from a large amount of patient feature data, constructs predictive models through complex, nonlinear rules, and ranks risk factors according to their importance. This capability is particularly advantageous compared to traditional logistic regression (LR) models for predicting ART outcomes: LR models are constrained by linear assumptions and can struggle with datasets containing many potential predictors (high dimensionality) or intricate interactions between factors. In contrast, ML algorithms inherently accommodate nonlinear relationships and high-dimensional feature spaces, automatically discovering complex interactions that might be critical yet overlooked in simpler models. The current research has employed ML models to predict ART outcomes including clinical pregnancy and live birth rates [812], with representative studies achieving area under the curve (AUC) values of 0.83 for implantation prediction, 0.97 for early miscarriage prediction, and 0.74 for live birth prediction. However, currently, prediction models for ART treatment outcomes in patients with EM mainly use LR model [13, 14], and there are relatively few prediction models using ML [15]. We employed six machine learning algorithms representing key computational paradigms: Logistic Regression (LR): A linear model providing probabilistic classification; Naïve Bayes (NB): A probabilistic classifier based on Bayes'theorem; k-Nearest Neighbors (KNN): An instance-based method using feature similarity; Random Forest (RF): An ensemble of decision trees with bagging; Neural Network (NNet): A multi-layered nonlinear function approximator; eXtreme Gradient Boosting (XGBoost): A scalable tree-boosting algorithm.

Given the high recurrence rate of EM and its progressive nature, timely conception is crucial. Fresh embryo transfer offers a significant clinical advantage in this context: it allows for immediate embryo transfer within the same ovarian stimulation cycle, minimizing treatment delay and exploiting the optimal therapeutic window before potential disease recurrence or progression can further compromise fertility potential. This strategy avoids the additional time required for endometrial preparation in frozen cycles and mitigates theoretical concerns, albeit debated, regarding cryopreservation effects on embryos, which might be particularly relevant in the context of the altered inflammatory and endocrine milieu associated with EM. This study aims to develop an interpretable machine learning model to predict clinical pregnancy for EM patients undergoing fresh embryo transfer, identifying key predictors (e.g., EM-specific inflammatory markers) using explainable AI techniques. We hypothesize that this approach will outperform conventional models in accuracy while providing clinically actionable insights for personalized treatment planning.

Methods

Study population

From January 01, 2014 to September 25, 2024, 2043 EM patients who underwent IVF or ICSI and fresh embryo transfer (fresh IVF/ICSI-ET) at the Jiangxi Maternal and Child Health Hospital, Reproductive Medicine Center, were retrospectively identified. The reproductive medicine ethics committee of Jiangxi Maternal and Child Health Hospital approved this study (SZYY-202410). This study was conducted in accordance with the principles of the Declaration of Helsinki.

EM was diagnosed by laparoscopic visualization of typical lesions or histological confirmation of biopsied tissues. Inclusion criteria: (1) EM confirmed via operative laparoscopy; (2) Fresh IVF/ICSI-ET cycles with oocyte retrieval between January 1, 2014 and September 25, 2024; (3) Infertility etiology including male factors, tubal infertility, or intrauterine adhesions. Exclusion criteria: (1) EM patients with comorbid polycystic ovary syndrome (PCOS) or adenomyosis – excluded to eliminate confounding effects of distinct endocrinopathies (PCOS) and uterine junctional zone disorders (adenomyosis) on ART outcomes; (2) Anatomical uterine anomalies affecting implantation; (3) Sperm/oocyte donation cycles or PGT cycles to ensure homogeneity of biological parenthood and embryo selection protocols. After screening, 1752 EM patients undergoing fresh IVF/ICSI-ET were included (Supplementary Fig. S1).

Sample size estimation and data processing

According to the"10 EPV"rule for establishing clinical prediction models, it is generally believed that each variable needs to include at least 10 events [16]. The prediction model of this study can include up to 30 factors that require 300 events to occur as dependent variables. Referring to the clinical pregnancy rate of 60% fresh embryo transfer in our center [17], the maximum required total sample size is (300/60%) = 500 cases.

Features with more than 25% missing values were excluded from subsequent analyses. If a single sample has more than five missing feature variables and the total number of samples with missing features is less than the total number of samples, 5% of the invalid sample entries are directly deleted. Some variables had missing data, including human chorionic gonadotropin (HCG) day hormones, body mass index (BMI), female anti-Müllerian hormone (AMH), and basal hormones. Our final dataset included 1752 patients. The following variables contained missing values: female BMI (n = 6 missing), basal follicle-stimulating hormone (FSH) (n = 28 missing), basal estradiol (E2) (n = 28 missing), basal luteinizing hormone (LH) (n = 28 missing), female AMH (n = 410 missing), hCG day E2 (n = 13 missing), hCG day LH (n = 31 missing), hCG day progesterone (P) (n = 17 missing), and hCG day endometrial thickness (n = 7 missing) (Supplementary Fig. S2). Initial attempts using mean and median imputation proved unsuitable as they substantially altered the distribution of AMH values (Supplementary Fig. S3 and Fig. S4). For hCG day hormones, we selected the last observation carried forward (LOCF) method based on clinical considerations of their individualized patterns during ovarian stimulation. For remaining variables (BMI, AMH, and basal hormones), multiple imputation was performed using random forest regression via the'mice'package. Both imputation approaches preserved the original data distributions (Supplementary Figs. S5 and S6).

Research variables and outcome variables

Finally, 24 features were included as research variables, including female age (year), male age (year), female infertility type (primary/secondary infertility), female infertility duration (year), female BMI, female basal hormones (including FSH, E2, and LH), female AMH, male BMI, controlled ovarian stimulation (COS) protocol (including ultralong gonadotropin-releasing hormone (GnRH) agonist protocol, the long GnRH agonist protocol, the GnRH antagonist protocol, or other protocols), startup dose of gonadotropins (Gn), total dose of Gn, dosing days of Gn, HCG day hormones (including E2, LH, and P), HCG day endometrial thickness, number of oocytes retrieved, fertilization method (including IVF, ICSI, and rescue ICSI), number of normal fertilization, number of high-quality day 3 embryos, stage of transferred embryos (cleavation/blastocyst).

The outcome variable was clinical pregnancy, defined as the presence of an embryo and heartbeat detected on ultrasound one month after transplantation. The clinical pregnancy outcome was treated as a binary classification task: pregnancy (positive class) versus no pregnancy (negative class).

Controlled ovarian stimulation and embryo transfer procedures

Ovarian stimulation and oocyte retrieval were performed using individualized protocols (GnRH agonist/antagonist). Follicular development was monitored through transvaginal ultrasonography and serum hormone assays. Triggering with recombinant hCG (250 µg) occurred when ≥ 1 dominant follicle reached ≥ 18 mm diameter, followed by transvaginal oocyte retrieval 36 h later. Retrieved oocytes were maintained at 37 °C under 5% CO₂ atmosphere pending fertilization.

Fertilization method (IVF/ICSI) was clinically determined: IVF used 50,000–100,000 motile spermatozoa per oocyte; ICSI was completed within 2–3 h post-retrieval. Embryos were graded per Istanbul consensus (2011), with high-quality day-3 embryos defined as 7–10 evenly sized blastomeres and ≤ 20% fragmentation. Fresh transfers (1–2 embryos/cycle) utilized ultrasound guidance. Clinical pregnancy required both: (1) Serum β-hCG > 5 IU/L at 14 days post-transfer, and (2) Intrauterine gestational sac with cardiac activity on 5-week ultrasound.

Feature selection, model development and comparison

To develop a predict model and validate it, 1752 patients were divided into a training set (n = 1226) and a testing set (n = 526) in a 7:3 ratio [18]and six ML models were selected for model development: NB, LR, RF, KNN, NNet, and XGBoost. This selection encompassed a representative spectrum of fundamental ML approaches (linear, probabilistic, instance-based, tree-based ensembles, and neural networks) commonly employed in biomedical prediction tasks. These models were chosen for their established performance in clinical outcome prediction, computational efficiency, and suitability for structured tabular data. Although other models like Support Vector Machines (SVM) or LightGBM were considered, the selected set provides robust algorithmic diversity for comparative evaluation within the scope of this study.

Given the class distribution (61.76% clinical pregnancy vs. 38.24% nonpregnancy), we implemented: (i) Stratified tenfold cross-validation during model training to preserve class proportions in all folds; (ii) Class-weighted learning using inverse class frequency (scikit-learn: class_weight = balanced); (iii) Threshold optimization via Youden's J statistic on validation folds; (iv) Imbalance-robust metrics: area under the receiver operating characteristic (ROC) curve (AUC), F1-score (Table 2).

Table 2.

Evaluation comparison of six ML models in the testing set

Models trained with all variables Accuracy Precision Recall F1 AUC
knn 0.591 0.211 0.381 0.271 0.495
rf 0.633 0.284 0.487 0.359 0.583
xgboost 0.658 0.278 0.552 0.371 0.622
nb 0.637 0.184 0.493 0.268 0.605
nnet 0.639 0.000 NA NA 0.551
lr 0.620 0.242 0.451 0.315 0.591

knn k-nearest neighbor, rf random forest, xgboost extreme gradient boosting, nb naive Bayes, nnet neural network, lr logistic regression

Preliminary predictor screening employed univariate (p < 0.2) and multivariate logistic regression (retained p < 0.2) to identify baseline clinical pregnancy factors, establishing a candidate variable pool independent of subsequent ML processes. For machine learning development: (1) Algorithm-specific feature subsets were optimized via Random Forest Recursive Feature Elimination (RFE) applied to candidate predictors; (2) Six ML algorithms were trained and validated through tenfold cross-validation [19]; (3) Model performance was evaluated using accuracy, precision, recall, F1 and ROC-AUC; (4) The optimal model was selected by maximal ROC-AUC; (5) SHAP (SHapley Additive exPlanations) analysis provided model interpretability – quantifying global feature importance and individual prediction contributions through game-theoretic attribution, thereby resolving"black-box"limitations of complex ML architectures.

Statistical analysis

Statistical analyses were performed using R version 3.4.4. The normality of variances in the data was analyzed using the Shapiro–Wilk test. The mean ± standard deviation is represented for normally distributed measurement data, the median [Q1, Q3] is represented for measured data with abnormal distribution, and the count data are represented by numbers and percentages. ANOVA or t test was used for normally distributed data, Kruskal–Wallis test and BH correction were used for non-normally distributed data, and the chi-square test or Fisher test was used for categorical data. Variable screening, model construction, evaluation, and interpretation were performed using R. Statistical significance was set at P < 0.05.

Results

Univariate and multivariate analysis of factors influencing clinical pregnancy

This study included 1752 patients, of whom 1082 achieved clinical pregnancy (clinical pregnancy rate: 61.76%) and 670 had implantation failure or biochemical pregnancy. Baseline characteristics of the overall cohort are provided in Supplementary Table S1. Subsequently, patients were randomly allocated to a training set (n = 1226) and a testing set (n = 526) in a 7:3 ratio. Statistical comparisons showed no significant differences in key baseline variables between the two sets (all P > 0.05; see Table S2), confirming balanced distributions.

To identify baseline factors independently associated with clinical pregnancy for preliminary screening, we performed multivariable logistic regression analysis with backward stepwise elimination. Variables were retained in the final multivariable model based on a significance threshold of p < 0.05. This analysis identified three significant independent predictors: male age (OR = 0.96, 95% CI 0.93–0.98, p < 0.001), number of normal fertilizations (OR = 1.07, 95% CI 1.03–1.11, p = 0.001), and number of transferred embryos (OR = 1.61, 95% CI 1.24–2.08, p < 0.001) (Table 1). Notably, the number of high-quality cleavage embryos showed a significant association in the initial multivariable model (OR = 1.09, 95% CI 1.00–1.18, p = 0.045) but was not retained in the final stepwise model (p = 0.061).

Table 1.

Univariate and multivariate analysis of factors influencing clinical pregnancy

OR (univariable)* OR (multivariable)** OR (final)***
Female age(year) 0.94(0.91–0.97, p < 0.0.1) 0.98(0.94–1.03, p = 0.474)
Male age(year) 0.95(0.93–0.98, p < 0.0.1) 0.97(0.93–1.01, p = 0.093) 0.96(0.93–0.98, p < 0.001)
Type of infertility, n (%) 1.14(0.91–1.44, p = 0.256)
Infertility duration (year), n (%) 1.10(0.86–1.3, p = 0.455)
Female BMI (kg/m2) 0.98(0.94–1.03, p = 0.434)
Basal FSH (IU/L) 0.99(0.94–1.04, p = 0.762)
Basal E2 (pg/mL) 1.00(1.00–1.01, p = 0.617)
Basal LH (IU/L) 1.02(0.98–1.06, p = 0.340)
Female AMH(μg/L) 1.13(1.05–1.21, p < 0.001) 1.05(0.97–1.15, p = 0.236)
Male BMI (kg/m2) 1.0(0.99–1.06, p = 0.239)
Protocol, n (%) 1.45(0.96–2.19, p = 0.078) 1.20(0.77–1.88, p = 0.417)
Strat dose of Gn 1.00(1.00–1.0, p = 0.015) 1.00(1.00–1.00, p = 0.446)
Total dose of Gn 1.00(1.00–1.0, p = 0.172) 1.00(1.00–1.0, p = 0.730)
Dosing days of Gn 1.02(0.97–1.08, p = 0.380)
E2 on HCG day (pg/mL) 1.00(1.00–1.0, p = 0.007) 1.00(1.00–1.0, p = 0.450)
LH on HCG day (IU/L) 1.01(0.95–1.09, p = 0.675)
P on HCG day (ng/mL) 0.98(0.73–1.31, p = 0.882)
HCG day endometrial thickness (mm) 1.0(0.99–1.07, p = 0.195) 1.01(0.97–1.06, p = 0.693)
Number of oocytes retrieved 1.06(1.03–1.09, p < 0.001) 1.02(0.97–1.07, p = 0.414)
Fertilization, % (n) 1.38(1.03–1.85, p = 0.029) 1.35(1.00–1.83, p = 0.053) 1.33(0.99–1.80, p = 0.060)
Number of normal fertilization 1.09(1.06–1.13, p < 0.001) 1.04(0.98–1.10, p = 0.150) 1.07(1.03–1.11, p = 0.001)
number of high-quality day 3 embryos 1.15(1.07–1.24, p < 0.001) 1.09(1.00–1.18, p = 0.045) 1.08(1.00–1.18, p = 0.061)
Stage of transferred embryos, % (n) 0.96(0.72–1.29, p = 0.791)
Number of embryos transferred, n (%) 1.48(1.15–1.90, p = 0.002) 1.62(1.25–2.11, p < 0.001) 1.61(1.24–2.08, p < 0.001)

*Univariate logistic regression

**Multivariable logistic regression

***Backward stepwise regression

Feature recursive elimination for variable screening and model development

To systematically evaluate the optimal feature set for prediction and mitigate potential overfitting, we performed recursive feature elimination (RFE) using a random forest estimator with tenfold cross-validation. The primary goal of this RFE analysis was to identify a potentially smaller subset of features that could maintain or improve model accuracy while enhancing simplicity and interpretability.

The RFE process iteratively removed the least important features (as ranked by the random forest) and evaluated model accuracy at each step using cross-validation within the training set. Surprisingly, the cross-validation results demonstrated that the highest mean accuracy was achieved when all 24 available features were included (Fig. 1). This finding suggests that the potentially complex, nonlinear interactions captured by the ML algorithms benefit from the complete feature space, even if individual variables did not reach strict statistical significance in the linear logistic regression framework. Crucially, the use of cross-validation during RFE inherently guards against overfitting to the specific training data at each feature subset evaluation step.

Fig. 1.

Fig. 1

Accuracy of recursive elimination of features

Based on these results, we concluded that utilizing the full feature set provided the best predictive performance within our modeling approach. Consequently, the training set data were used to generate six distinct ML models to predict clinical pregnancy. Furthermore, to rigorously assess generalization and final model performance while further mitigating overfitting concerns, all models were evaluated on the completely independent testing set (n = 526), as reported in Table 2. All ML models underwent hyperparameter optimization via tenfold cross-validation and the specific hyperparameter configurations were provided in Supplementary Table S3.

Optimal model selection and generalization performance analysis

As detailed in Table 2, the XGBoost model demonstrated superior performance with the highest accuracy (0.658) and AUC (0.622) among all algorithms, along with the best recall (sensitivity = 0.552) for identifying actual pregnancy cases. However, a performance gap was observed between training (AUC = 0.764) and testing phases (ΔAUC = 0.142) (Fig. 2), suggesting potential overfitting. This generalization gap likely stems from complex interactions in the high-dimensional feature space, biological heterogeneity in endometriosis phenotypes, and sample size limitations for capturing rare predictive patterns.

Fig. 2.

Fig. 2

ROC curves of the xgboost model in training set and testing set

To address overfitting concerns while preserving predictive capacity, we implemented three key mitigation strategies: (1) Incorporation of L1/L2 regularization in XGBoost to penalize complex feature interactions; (2) Cross-validated hyperparameter tuning optimizing tree depth and learning rate; (3) Early stopping during training when validation loss plateaued. Despite the performance gap, XGBoost maintained clinically critical sensitivity for fertility applications where false negatives carry significant emotional burden. Its precision-recall curve (Fig. 3) confirmed robust risk stratification capability (AUPRC = 0.692 vs baseline 0.639), with precision exceeding 0.5 at high-specificity thresholds suitable for identifying low-probability cases.

Fig. 3.

Fig. 3

Precision-Recall curve for the XGBoost model

Final model interpretation and clinical application

The XGBoost model was selected as the optimal predictor following comparative evaluation of six machine learning algorithms. To enhance clinical interpretability, we applied SHAP analysis, which quantifies feature contributions to the model's predicted probability of clinical pregnancy. Global interpretation (Fig. 4 and Supplementary Figure S7) identified the four most influential predictors in descending order: (1) Progesterone on hCG day (levels ≥ 2 ng/mL associated with lowest SHAP values and reduced pregnancy probability), (2) Anti-Müllerian Hormone (AMH) exhibiting a positive dose–response relationship (peak probability at ≥ 9 μg/L), (3) Number of embryos transferred (≥ 2 embryos yielding maximum benefit), and 4) Number of normal fertilizations (linear probability increase).

Fig. 4.

Fig. 4

SHAP provides a global interpretation of the XGBoost model. SHAP summary plot displays the six most influential predictors, arranged in two rows: Upper row: female age,progesterone on hCG day, anti-Müllerian hormone (AMH), Lower row: number of embryos transferred, number of normal fertilizations, female body mass index.horizontal position reflects impact direction on clinical pregnancy probability

Figure 5 illustrates the individualized SHAP force plot interpretation for Sample ID 10. The baseline prediction (mean clinical pregnancy probability across all patients, E[f(x)]) is 0.452. Key features reducing pregnancy probability (left-directed red arrows) include: normal fertilization count = 2 (SHAP value =  − 0.232), AMH = 1.38 μg/L (− 0.138), and progesterone on hCG day = 1.59 ng/mL (− 0.160). Positive contributions (right-directed yellow arrows) arise from: female BMI = 28.4 kg/m2 (+ 0.093), LH on hCG day = 6.01 IU/L (+ 0.142), and the collective effect of 19 other features (+ 0.288). The net summation of these forces shifts the prediction from the baseline to the final output value f(x) = 0.400, indicating a 40.0% predicted probability of clinical pregnancy. This visualization highlights how specific risk factors—particularly low fertilization count and AMH—drive the subaverage prediction for this patient.

Fig. 5.

Fig. 5

SHAP's individual explanation of the XGBoost model. Notes: This is the model's prediction of clinical pregnancy rate for specimen 10

Discussion

This study analyzed data from a fresh embryo transfer cohort of 1752 patients with EM from 2014 to 2024. Twenty-four feature variables were selected for six ML algorithms to construct a clinical pregnancy prediction model. The XGBoost model demonstrated superior performance, achieving AUC values of 0.764 in the training set and 0.622 in the testing set. SHAP analysis enhanced model interpretability by quantifying global feature importance and visualizing individual prediction contributions through force plots, enabling clinically actionable insights for treatment personalization.

Research on prediction models for fresh embryo transfer outcomes in EM patients remains limited, with few directly comparable studies. Pan et al. [15] developed an ensemble ML model using 464 EM patients, reporting testing AUC of 0.652 (base model) and 0.718 (optimized). While their discriminative performance parallels our XGBoost model (testing AUC = 0.622), their substantially smaller sample size may compromise generalizability and their approach lacked model interpretability mechanisms. Conversely, Zhu et al. [14] achieved higher AUCs (0.800–0.807) through traditional logistic regression in 1,630 patients, but this method is fundamentally constrained by its linear assumptions and inability to capture complex interactions—potentially explaining why their model included clinically atypical predictors like ASRM staging while omitting established biomarkers like progesterone levels. ML algorithms inherently overcome these limitations through their capacity to model nonlinear relationships and high-order feature interactions [20], which may better reflect the biological complexity of EM-related infertility. Our study advances this field by: (1) employing six distinct ML algorithms on a robust cohort (n = 1,752); (2) implementing SHAP-based interpretability to identify progesterone, AMH, and fertilization metrics as key drivers; and (3) providing clinically actionable individual risk profiles. Although discriminative performance was moderate, this interpretable framework offers superior clinical utility for personalized treatment planning compared to conventional'black-box'models or biologically implausible regression outputs.

The absence of standardized feature selection methodologies in clinical prediction modeling necessitates reliance on domain expertise and data availability [21]. To address this, our study implemented a dual-strategy approach: (1) Recursive feature elimination (RFE) optimized variable selection through cross-validated importance ranking; (2) SHAP analysis quantified and visualized feature contributions [22]. These methods identified progesterone on hCG day, AMH, number of transferred embryos, and normal fertilization count as the four most influential predictors—consistent with established biological mechanisms of embryo implantation [11, 2325]. Notably, SHAP's global feature ranking demonstrated strong concordance with traditional statistical analysis: both methods independently confirmed the significance of normal fertilization count (SHAP rank = 4; logistic OR = 1.07, p = 0.001) and transferred embryo count (SHAP rank = 3; OR = 1.61, p < 0.001). This methodological triangulation validates SHAP's efficacy in identifying clinically relevant predictors while overcoming logistic regression's linearity constraints. Critically, SHAP's force plots (Fig. 5) and dependence diagrams (Fig. 4 and Supplementary Figure S7) provide granular, patient-level explanations of how specific feature values modify pregnancy probabilities—enabling clinicians to: (a) understand population-level predictor hierarchies, (b) visualize individual risk factor interactions, and (c) contextualize model outputs within biological thresholds (e.g., AMH ≥ 9 μg/L optimization). This multi-level interpretability framework fulfills the essential precondition for clinical adoption of ML models [26], transforming algorithmic outputs into actionable decision support.

The model's discriminative performance (testing AUC = 0.622) was lower than some high-performing tools (AUC 0.8–0.9) [27, 28], partially reflecting exclusion of critical biological determinants: embryonic ploidy (aneuploidy profoundly reduces implantation potential), endometrial receptivity biomarkers (e.g., integrin β3, HOXA10), and endometrial thickness [29, 30]. Nevertheless, our model achieves clinically meaningful stratification (AUPRC = 0.692 vs baseline prevalence 0.639) with specific utility in identifying low-probability cases at high-specificity thresholds (precision = 0.278, recall = 0.552). This targeted capability—combined with SHAP-driven interpretability—provides actionable guidance for managing EM patients where comprehensive embryo/endometrial assessment is unavailable.

This study acknowledges several limitations: its retrospective design may introduce selection bias; single-center data acquisition necessitates prospective multicenter validation for generalizability; and the absence of EM-specific characteristics—including rASRM staging, surgical history (e.g., endometrioma excision), and lesion localization (peritoneal/deep infiltrating/ovarian)—represents a significant constraint given their documented impact on ART outcomes. Notwithstanding these limitations, we established an interpretable XGBoost model predicting clinical pregnancy in EM patients undergoing fresh embryo transfer. While demonstrating acceptable discriminative capacity (testing AUC = 0.622), the model's clinical value resides in: (1) SHAP-driven identification of progesterone, AMH, and embryonic factors as key predictors; (2) Personalized risk quantification enabling expectation management through patient-specific probabilities; and (3) Actionable stratification distinguishing candidates for treatment modification. This framework provides clinicians with an evidence-based decision tool while helping patients establish realistic prognostic expectations. Future studies should validate the model's impact on psychological outcomes, decision-making quality, and treatment efficiency across diverse populations.

Supplementary Information

Additional file1 (747.7KB, docx)

Author contributions

XW conceived and designed the study. MY and XW supervised the study and analyzed the data. ZH performed the data analysis with the help of JT and XW wrote the manuscript. All authors revised and approved the final manuscript.

Funding

This work was supported by the Scientific Research Project of the Jiangxi Provincial Health Commission (No. 202211108) and the Science and Technology Plan of Jiangxi Provincial Administration of Traditional Chinese Medicine (No. 2022B272).

Data availability

No datasets were generated or analysed during the current study.

Declarations

Ethics approval and consent to participate

The reproductive medicine ethics committee of Jiangxi Maternal and Child Health Hospital approved this study, with a partial exemption from informed consent (SZYY-202410) and the study was not registered.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Saunders PTK, Horne AW. Endometriosis: etiology, pathobiology, and therapeutic prospects. Cell. 2021;184(11):2807–24. [DOI] [PubMed] [Google Scholar]
  • 2.Taylor HS, Kotlyar AM, Flores VA. Endometriosis is a chronic systemic disease: clinical challenges and novel innovations. Lancet (London, England). 2021;397(10276):839–52. [DOI] [PubMed] [Google Scholar]
  • 3.Ata B, Somigliana E. Endometriosis, staging, infertility and assisted reproductive technology: time for a rethink. Reprod Biomed Online. 2024;49(1):103943. [DOI] [PubMed] [Google Scholar]
  • 4.Pais AS, Almeida-Santos T. Recent insights explaining susceptibility to endometriosis-from genetics to environment. WIREs Mech Dis. 2023;15(6):e1624. [DOI] [PubMed] [Google Scholar]
  • 5.Huang Y, Wang Z, Li B, Ke L, Xiong Y, Zhang Y. Loss of KLF15 impairs endometrial receptivity by inhibiting EMT in endometriosis. J Endocrinol. 2024. 10.1530/JOE-23-0319. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Melado L, Ata B. Chapter 11. Endometriosis-related complications in women undergoing in-vitro fertilization. Best Pract Res Clin Obstet Gynaecol. 2024;93:102456. [DOI] [PubMed] [Google Scholar]
  • 7.Bourdon M, Peigné M, Maignien C, de Villardi MD, Solignac C, Darné B, et al. Impact of endometriosis surgery on in vitro fertilization/intracytoplasmic sperm injection outcomes: a systematic review and meta-analysis. Reprod Sci. 2024;31(6):1431–55. [DOI] [PubMed] [Google Scholar]
  • 8.Yiğit P, Bener A, Karabulut S. Comparison of machine learning classification techniques to predict implantation success in an IVF treatment cycle. Reprod Biomed Online. 2022;45(5):923–34. [DOI] [PubMed] [Google Scholar]
  • 9.Liu L, Jiao Y, Li X, Ouyang Y, Shi D. Machine learning algorithms to predict early pregnancy loss after in vitro fertilization-embryo transfer with fetal heart rate as a strong predictor. Comput Methods Programs Biomed. 2020;196:105624. [DOI] [PubMed] [Google Scholar]
  • 10.Liu R, Bai S, Jiang X, Luo L, Tong X, Zheng S, et al. Multifactor prediction of embryo transfer outcomes based on a machine learning algorithm. Front Endocrinol. 2021;12:745039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Zhu H, Zhao C, Xiao P, Zhang S. Predicting the likelihood of live birth in assisted reproductive technology according to the number of oocytes retrieved and female age using a generalized additive model: a retrospective cohort analysis of 17,948 cycles. Front Endocrinol. 2021;12:606231. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Goyal A, Kuchana M, Ayyagari KPR. Machine learning predicts live-birth occurrence before in-vitro fertilization treatment. Sci Rep. 2020;10(1):20925. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Huang FP, Zhang HL, Xie X, Du SR, Yi JS. A model for pregnancy rates after IVF-ET in patients with infertility and endometriosis. Eur Rev Med Pharmacol Sci. 2022;26(19):7188–94. [DOI] [PubMed] [Google Scholar]
  • 14.Zhu S, Liao X, Jiang W, Sun Y, Chen X, Zheng B. Development and validation of a nomogram model for predicting clinical pregnancy in endometriosis patients undergoing fresh embryo transfer. BMC Pregnancy Childbirth. 2023;23(1):764. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Pan S, Li Y, Wu Z, Mao Y, Wang C. Establishment of a predictive nomogram for clinical pregnancy rate in patients with endometriosis undergoing fresh embryo transfer. Nan Fang Yi Ke Da Xue Xue Bao = J South Med Univ. 2024;44(7):1407–15. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Riley RD, Ensor J, Snell KIE, Harrell FE Jr, Martin GP, Reitsma JB, et al. Calculating the sample size required for developing a clinical prediction model. BMJ (Clinical research ed). 2020;368:m441. [DOI] [PubMed] [Google Scholar]
  • 17.Wan X, Wan Y, Yu M, Zhang Z, Huang Z, Tan J. A nomogram model for predicting clinical pregnancy after fresh IVF/ICSI-ET in patients with infertility and endometriosis. J Coll Phys Surgeons-Pakistan : JCPSP. 2024;34(12):1429–35. [DOI] [PubMed] [Google Scholar]
  • 18.Raschka SJA. Model evaluation, model selection, and algorithm selection in machine Learning. 2018.
  • 19.Okada S, Ohzeki M, Taguchi S. Efficient partition of integer optimization problems with one-hot encoding. Sci Rep. 2019;9(1):13036. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Handelman GS, Kok HK, Chandra RV, Razavi AH, Lee MJ, Asadi H. Edoctor: machine learning and the future of medicine. J Intern Med. 2018;284(6):603–19. [DOI] [PubMed] [Google Scholar]
  • 21.Li Y, Sperrin M, Ashcroft DM, van Staa TP. Consistency of variety of machine learning and statistical models in predicting clinical risks of individual patients: longitudinal cohort study using cardiovascular disease as exemplar. BMJ (Clinical research ed). 2020;371:m3919. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Zhang Z. Variable selection with stepwise and best subset approaches. Ann Transl Med. 2016;4(7):136. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Kalakota NR, George LC, Morelli SS, Douglas NC, Babwah AV. Towards an improved understanding of the effects of elevated progesterone levels on human endometrial receptivity and oocyte/embryo quality during assisted reproductive technologies. Cells. 2022. 10.3390/cells11091405. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Sellami I, Barbotin AL, Bernard V, Robin G, Catteau-Jonard S, Sonigo C, et al. Anti-Mullerian hormone assessment in assisted reproductive technique outcome and natural conception. Sem Reprod Med. 2024;42(1):25–33. [DOI] [PubMed] [Google Scholar]
  • 25.Schneider E, Hamer O, Smith C, Hill J. Evaluating the association of female obesity with the risk of live birth following IVF: implications for clinical practice. Pract Midwife. 2024;27:20240101. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Rosenberg MA. Trusting magic: interpretability of predictions from machine learning algorithms. Circulation. 2021;143(13):1299–301. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Hu J, Xu J, Li M, Jiang Z, Mao J, Feng L, et al. Identification and validation of an explainable prediction model of acute kidney injury with prognostic implications in critically ill children: a prospective multicenter cohort study. EClinicalMedicine. 2024;68:102409. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Yesilyaprak A, Kumar AK, Agrawal A, Furqan MM, Verma BR, Syed AB, et al. Predicting long-term clinical outcomes of patients with recurrent pericarditis. J Am Coll Cardiol. 2024;84(13):1193–204. [DOI] [PubMed] [Google Scholar]
  • 29.Jin Z, Li J, Yang E, Shi H, Bu Z, Niu W, et al. Effect of endometrial thickness changes on clinical pregnancy rates after progesterone administration in a single frozen-thawed euploid blastocyst transfer cycle using natural cycles with luteal support for PGT-SR- and PGT-M-assisted reproduction: a retrospective cohort study. Reprod Biol Endocrinol : RB&E. 2021;19(1):154. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Pirtea P, de Ziegler D, Ayoubi JM. Endometrial receptivity in adenomyosis and/or endometriosis. Fertil Steril. 2023;119(5):741–5. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Additional file1 (747.7KB, docx)

Data Availability Statement

No datasets were generated or analysed during the current study.


Articles from European Journal of Medical Research are provided here courtesy of BMC

RESOURCES