Skip to main content
International Journal of Women's Health logoLink to International Journal of Women's Health
. 2026 Oct 1;18:627925. doi: 10.2147/IJWH.S627925

A Machine Learning–Based Prediction Model for Deep Infiltrating Endometriosis

Guoquan Sun 1, Ling Liu 1,✉
PMCID: PMC13637508  PMID: 42835735

Abstract

Objective

Deep infiltrating endometriosis (DIE) is a severe endometriosis phenotype. This study aimed to develop and internally validate a machine learning-based predictive model for DIE using retrospective clinical data from a single center to improve diagnostic accuracy.

Materials and Methods

Clinical, imaging, and laboratory data were retrospectively collected from 250 surgically confirmed DIE patients and non-DIE endometriosis controls (2020–2025). Samples were randomly split 7:3 into training and internal validation sets. Three machine learning algorithms-Random Forest (RF), Gradient Boosting Machine (GBM), and Support Vector Machine (SVM)-were developed and compared with conventional logistic regression. Model performance was assessed using AUC, sensitivity, specificity, calibration, and decision curves. The model was designed to identify DIE among patients with confirmed or suspected endometriosis.

Results

Univariate analysis identified seven independent predictors (age, BMI, CA125, CA199, neutrophil-to-lymphocyte ratio, albumin, ovarian endometrioma), confirmed by multivariate logistic regression. In the validation set, AUCs were 0.787 (RF), 0.740 (GBM), 0.685 (SVM), and 0.709 (logistic regression). RF achieved 0.714 accuracy and 0.821 specificity, alongside favorable calibration and a positive net clinical benefit.

Conclusion

In this retrospective single-center exploratory study, the RF model demonstrated moderate non-invasive predictive performance for DIE. However, this performance level does not yet support clinical readiness, and external multicenter validation is needed to confirm generalizability.

Keywords: deep infiltrating endometriosis, machine learning, predictive model, internal validation

Introduction

Deep infiltrating endometriosis (DIE) is the most aggressive phenotype of endometriosis, histopathologically defined as endometrial-like glands and stroma infiltrating to a depth of ≥5 mm beneath the peritoneal surface. The Enzian classification is currently the most widely used system for describing DIE lesion locations, categorizing involvement of the posterior and anterior pelvic compartments.1 Clinically, DIE frequently involves pelvic organs such as the rectum, ureters, and bladder, leading to debilitating pelvic pain, dyspareunia, infertility, and intestinal or urinary tract symptoms.2 Because the clinical presentation of DIE lacks specificity and overlaps with that of ovarian endometrioma or superficial peritoneal endometriosis, early identification based solely on symptoms is challenging.3 Currently, transvaginal ultrasound and pelvic magnetic resonance imaging (MRI) are commonly used non-invasive imaging examinations. Expert-performed ultrasound and MRI have demonstrated high diagnostic accuracy for DIE, with reported sensitivity and specificity exceeding 90% for certain anatomical sites. However, these examinations are highly operator-dependent, require specialized expertise, and may not be readily available in all clinical settings. Consequently, diagnostic accuracy in routine practice varies considerably, and definitive diagnosis still requires laparoscopic surgery and pathological biopsy.4,5 Consequently, developing a non-invasive predictive model based on routine clinical, imaging, and laboratory indicators holds significant clinical value for the early screening, stratified management, and avoidance of unnecessary invasive procedures for DIE.

In existing studies on predictive models for DIE, early investigations primarily utilized conventional logistic regression. For instance, Perelló et al (2017) developed a DIE prediction model using clinical indicators from patients with ovarian endometrioma, achieving an area under the curve (AUC) of 0.91 with internal validation.6 Arfi et al (2019) developed a nomogram (AUC 0.81) to predict live birth rates after DIE surgery. Although these studies confirmed the predictive value of clinical data, they did not incorporate machine learning methods.7 With the advancement of artificial intelligence, machine learning has gradually been applied to imaging-assisted diagnosis of DIE. Xu et al (2025) used a YOLOv8 deep learning model to detect DIE, significantly improving the diagnostic performance of junior sonographers (AUC increased from 0.748 to 0.878).8 Peluso et al (2026) combined MRI radiomics, graph computing, and machine learning to distinguish active from fibrotic DIE lesions (balanced accuracy 72.7%), demonstrating the potential of integrating radiomics and machine learning, although their objective was not to predict the presence of DIE based on multimodal clinical data.9 Simultaneously, numerous machine learning diagnostic models based on gene expression data have emerged. Shi et al (2024) identified the biomarker USP14 (AUC 0.786) using Least Absolute Shrinkage and Selection Operator (LASSO), Random Forest (RF), and Support Vector Machine (SVM).10 She et al (2022) combined RF and an artificial neural network to construct an endometriosis diagnostic model.11 Zhang et al (2023) used 11 algorithms, including RF, SVM, Gradient Boosting Machine (GBM), and neural networks, to screen five key genes, achieving an AUC of 0.836.12 Similarly, Zou et al (2023) applied RF, SVM, and LASSO to identify aging-related genes and constructed a neural network classifier.13 Recent systematic reviews have confirmed these trends. A meta-analysis by Zhang et al (2026) included 45 studies and found that machine learning models based on clinical features achieved a validation set AUC of only approximately 0.80, whereas models based on imaging and genetic data achieved AUCs of up to 0.98 and 0.87, respectively.14 A literature review by Shrestha et al (2025) also indicated promising prospects for machine learning in imaging diagnosis of endometriosis, but noted a persistent lack of predictive models specifically designed for DIE that are based on routine clinical/imaging/laboratory indicators and employ multiple mainstream machine learning algorithms with internal validation.15 Most existing machine learning models rely on costly or less accessible genetic data, focus on lesion detection rather than comprehensive clinical diagnosis of DIE, and are often limited by small sample sizes. Although individual markers such as CA125, CA199, and NLR have been associated with DIE, no single indicator offers sufficient diagnostic accuracy. A model integrating multiple readily available clinical, imaging, and laboratory parameters could provide standardized risk assessment when expert imaging is unavailable or inconclusive.

Therefore, this study retrospectively collects clinical, imaging, and laboratory data from 250 patients over the past five years. Three machine learning algorithms will be employed to construct and internally validate DIE prediction models. By comparing their discriminative ability, calibration, and clinical utility, we will select the optimal model. Intended for use in patients with suspected or surgically confirmed endometriosis—rather than for asymptomatic screening—this tool can assist outpatient physicians in timely risk stratification and referral decisions, especially when expert ultrasound or MRI is unavailable or inconclusive.

Materials and Methods

Sample Size Calculation

According to the principles of sample size estimation for machine learning prediction model development, the Events Per Variable (EPV) method was used. This study planned to include 5–7 predictor variables. Referring to the study by Perelló et al (2017), the incidence of DIE was assumed to be 50%–60%.6 To ensure model stability and avoid overfitting, an EPV of 15 was adopted. With 7 predictor variables, the required number of DIE events was 7×15 = 105, and the minimum total sample size was 105/0.5 = 210 cases. With 5 predictor variables and EPV = 20, the minimum total sample size was 5×20/0.5 = 200 cases. Consequently, this study ultimately plans to enroll 250 cases, meeting the sample size requirements for machine learning prediction models.

Inclusion Criteria

(1) All patients underwent laparoscopic or open surgical resection of lesions, with postoperative pathological examination definitively diagnosing endometriosis. (2) Pelvic MRI or transvaginal ultrasound was performed within 2 weeks before surgery, with complete and interpretable imaging data. (3) Peripheral venous blood was collected within 1 month before surgery to complete laboratory tests. (4) Complete clinical medical records were available.

Exclusion Criteria

(1) Preoperative hormonal therapy for more than 1 month. (2) Co-existing other malignant tumors or severe systemic diseases. (3) Prior pelvic radiotherapy or radical surgery for pelvic malignancy. (4) More than 20% missing key clinical, imaging, or laboratory data. (5) Pregnancy or lactation. (6) Postoperative pathological diagnosis of diseases other than endometriosis.

Pathological Assessment

All surgical specimens were fixed in 10% neutral-buffered formalin, routinely processed, embedded in paraffin, and sectioned at 4-μm thickness. Sections were stained with hematoxylin and eosin (H&E) for histopathological evaluation. DIE was defined as the presence of endometrial glands and stroma infiltrating to a depth of ≥5 mm beneath the peritoneal surface, as measured by an ocular micrometer on the H&E-stained sections. The depth of infiltration was independently measured by two pathologists. In cases of disagreement, a third senior pathologist was consulted to reach a consensus. The presence of fibrosis, smooth muscle metaplasia, and surrounding tissue involvement was also recorded as ancillary diagnostic features. Pathologists were blinded to the patients’ clinical and imaging data during the histopathological evaluation.

Data Collection

All patients were consecutively enrolled from the Department of Obstetrics and Gynecology of Hangzhou Red Cross Hospital between January 2020 and December 2025. No specific sampling strategy was applied; all eligible patients who met the inclusion criteria during the study period were included to minimize selection bias.

General Baseline and Past Medical History Data

General demographic and physiological baseline data were collected, including age in years at admission, fasting height and weight measured by nursing staff according to standard protocols at admission (used to calculate Body Mass Index, BMI), self-reported age in years at menarche, regularity of menstrual cycles during the 6 months before admission, all clinically confirmed previous pregnancies, and the number of previous pregnancy terminations before 28 weeks of gestation. All baseline data were verified against original medical records to ensure accuracy. Patients’ histories of prior pelvic surgeries and diseases were collected, including a history of prior laparoscopic or open surgery for endometriosis (confirmed by previous surgical records and postoperative pathology reports). Additionally, a history of other pelvic surgeries (excluding those for endometriosis) was collected, including cesarean section, uterine myomectomy, benign ovarian tumor surgery, fallopian tube-related surgery, and pelvic adhesiolysis.

Clinical Symptom Data

Clinical symptoms related to endometriosis during the 6 months before admission were collected. These included lower abdominal distending pain during menstruation clearly related to the menstrual cycle, persistent or intermittent pelvic pain lasting more than 6 months, deep pelvic pain in the lower abdomen during or after sexual intercourse, and defecation-related discomfort (eg, anal tenesmus, difficulty defecating, or sensation of incomplete evacuation) occurring during or just before menstruation. All symptoms were documented based on the admission history of present illness and gynecological physical examination records, while excluding symptoms caused by other definite organic diseases.

Laboratory Test Indicators

Fasting peripheral venous blood test results collected within 24 hours after admission and before surgery were obtained. All blood samples were collected, centrifuged, and tested according to the standardized procedures of our hospital’s clinical laboratory, using fixed instruments and reagents, with qualified internal quality control and external quality assessment. Specific indicators included serum carbohydrate antigen 125 (CA125), carbohydrate antigen 199 (CA199), carcinoembryonic antigen level (CEA), the neutrophil-to-lymphocyte ratio calculated from complete blood count, and serum albumin level. All test results were directly extracted from the official reports issued by the clinical laboratory, ensuring complete consistency with the original test reports.

Imaging Lesion Data

Imaging examination results completed at our hospital within 1 month before admission were collected. All images were independently interpreted in a double-blinded manner by two senior specialist physicians. In cases of disagreement, a chief physician with higher seniority reviewed the images to reach a final diagnosis. The collected data specifically included the presence of ovarian endometrioma assessed by transvaginal gynecological ultrasound and the presence of ureteral dilation assessed by urinary ultrasound or whole-abdominal computed tomography. Diagnoses followed standard imaging criteria for the respective diseases, and imaging abnormalities caused by factors unrelated to endometriosis were excluded.

Outcome Definition

The primary outcome of this study was the presence or absence of DIE, using postoperative pathological examination as the gold standard. According to the Enzian classification and pathological diagnostic criteria, DIE was defined as lesions infiltrating to a depth of ≥ 5 mm, involving pelvic structures such as the uterosacral ligaments, rectum, vagina, bladder, or ureters.16 All patients underwent laparoscopic or open surgical resection, and postoperative pathological reports were independently issued by two pathologists. The pathologists were blinded to the patients’ clinical, imaging, and laboratory data during histopathological evaluation. Inter-observer agreement was assessed, and disagreements were resolved by consultation with a third senior pathologist.

Statistical Analysis

Statistical analyses were performed using Statistical Product and Service Solutions 26.0 (SPSS 26.0) and R Programming Language 4.5.1 (R 4.5.1). Graphs were generated using GraphPad Prism 9.0. The significance level was set at α = 0.05, and a two-tailed P < 0.05 was considered statistically significant. Continuous data were first tested for normality. Data following a normal distribution were presented as mean ± standard deviation (X±S), and comparisons between groups were performed using the t-test. Data not following a normal distribution were presented as median (interquartile range), and comparisons between groups were performed using the Mann–Whitney U-test. Categorical data were presented as counts (percentages), and comparisons between groups were performed using the χ2 test, or Fisher’s exact test when the expected frequency was < 5. Patients were randomly divided into a training set and a validation set at a ratio of 7:3 using a random number table. Before grouping, the balance of baseline clinical characteristics between the two sets was verified using the aforementioned tests. Missing data, which accounted for less than 5% of all included variables, were handled by median imputation for continuous variables and mode imputation for categorical variables using training set statistics. The dataset showed no significant class imbalance (DIE: 50.9% in training, 49.3% in validation), thus no oversampling or undersampling techniques were applied.

In the training set, univariate analysis was performed to screen for potential predictors with P < 0.05. LASSO regression was used for variable compression and redundancy elimination. The optimal parameters were determined using 10-fold cross-validation to obtain the core predictor variables, which were then included in a multivariable logistic regression model using a stepwise backward elimination method to select predictive factors. The multicollinearity diagnostic test was performed using variance inflation factor (VIF), with VIF < 10 indicating no significant multicollinearity.

Based on the predictors screened by the above process, four prediction models were developed on the training set: Random Forest (RF), Gradient Boosting Machine (GBM), Support Vector Machine (SVM), and conventional logistic regression. For each machine learning algorithm, hyperparameters were tuned using grid search with 10-fold cross-validation within the training set. The final hyperparameters for RF were ntree=500 and mtry=3; for GBM, n.trees=100, interaction.depth=3, and shrinkage=0.1; and for SVM, cost=1 and gamma=0.1 with a radial basis kernel. Logistic regression was developed using the same set of predictors without hyperparameter tuning. The classification threshold was set at 0.5 by default, as no alternative threshold was optimized. Continuous variables were not separately standardized, as tree-based algorithms (RF and GBM) are scale-invariant, and SVM performance was not superior in our preliminary analysis.

This sequential procedure—univariate screening, LASSO compression, and multivariable logistic regression—was applied solely to identify the final set of predictors for inclusion in the machine learning models. The final machine learning models were then developed independently using this same set of predictors, without further feature selection, to avoid circularity and ensure comparability across models. Receiver Operating Characteristic (ROC) curves were plotted, and the AUC with 95% Confidence Interval (CI) was calculated to evaluate model discrimination. Model discrimination was further evaluated using sensitivity, positive predictive value (PPV), negative predictive value (NPV), and F1-score. 95% confidence intervals for AUC, accuracy, sensitivity, and specificity were calculated using the bootstrap method with 1000 resamples. Pairwise comparisons of AUCs between models were performed using DeLong’s test. Calibration curves were plotted, and the Hosmer-Lemeshow test was used to assess the agreement between predicted probabilities and actual outcomes. In addition, calibration was assessed by calibration slope, intercept, and Brier score.

Decision curve analysis (DCA) was performed to evaluate the clinical net benefit of each model across a range of threshold probabilities. For the RF model, the out-of-bag (OOB) error rate was monitored during training to assess generalization performance. To enhance model interpretability, SHapley Additive exPlanations (SHAP) analysis was conducted to quantify the contribution of each predictor Internal validation was performed using 1000 bootstrap samples to correct for overfitting bias. For machine learning model development, all preprocessing and feature selection steps were performed exclusively on the training set, with the validation set held out and not used until the final model evaluation to prevent information leakage.

Results

Comparison of General Data Between Training and Validation Sets

Among the 175 patients in the training set, 89 (50.86%) had DIE. Among the 75 patients in the validation set, 37 (49.33%) had DIE. No statistically significant differences were found in the general data between the training and validation sets (P>0.05) (Table 1).

Table 1.

Comparison of General Data Between the Training and Validation Sets

Variable Training
Set (n=175)
Validation
Set (n=75)
Statistical
Value
P
Age (years) 33.51±5.98 32.73±5.72 0.959 0.339
BMI (kg/m2) 22.32±3.24 22.87±3.11 1.236 0.218
Age at menarche (years) 13.21±1.10 13.42±1.09 1.332 0.184
Menstrual regularity Regular 127(72.57) 52(69.33) 0.271 0.603
Irregular 48(27.43) 23(30.67)
Parity 0 34(19.43) 12(16.00) 0.430 0.807
1 82(46.86) 36(48.00)
≥2 59(33.71) 27(36.00)
Number of miscarriages 0 125(71.43) 51(68.00) 0.385 0.825
1 41(23.43) 19(25.33)
≥2 9(5.14) 5(6.67)
Prior surgery for endometriosis Yes 17(9.71) 5(6.67) 0.608 0.436
No 158(90.29) 70(93.33)
Prior other pelvic surgery Yes 36(20.57) 17(22.67) 0.138 0.710
No 139(79.43) 58(77.33)
Dysmenorrhea Yes 84(48.00) 34(45.33) 0.150 0.699
No 91(52.00) 41(54.67)
Chronic pelvic pain Yes 53(30.29) 25(33.33) 0.227 0.634
No 122(69.71) 50(66.67)
Dyspareunia Yes 58(33.14) 23(30.67) 0.147 0.701
No 117(66.86) 52(69.33)
Defecation pain or difficulty Yes 45(25.71) 21(28.00) 0.141 0.707
No 130(74.29) 54(72.00)
CA125(U/mL) 42.16±15.28 40.72±14.58 0.691 0.490
CA199(U/mL) 31.40±16.97 30.25±16.41 0.494 0.622
CEA(ng/mL) 2.12±0.80 2.07±0.78 0.407 0.685
NLR 2.65±1.78 2.56±1.71 0.412 0.681
Albumin (g/L) 40.73±3.36 40.98±3.30 0.553 0.581
Ovarian endometrioma Yes 88(50.29) 35(46.67) 0.275 0.600
No 87(49.71) 40(53.33)
Ureteral dilation Yes 17(9.71) 9(12.00) 0.294 0.587
No 158(90.29) 66(88.00)

Univariate Analysis for the Presence of DIE

Univariate analysis revealed significant differences between the DIE and non-DIE groups in the training set regarding age, BMI, CA125, CA199, NLR, albumin, and the presence of ovarian endometrioma (P<0.05) (Supplemental Table 1).

Multivariate Logistic Regression Analysis for the Presence of DIE

Using postoperatively confirmed DIE as the binary dependent variable (DIE = 1, non-DIE = 0), variables with P < 0.05 in the univariate analysis were incorporated into the LASSO regression for variable selection. The lambda.1se criterion was applied to select the final variables (Figure 1). The multicollinearity diagnostic test yielded variance inflation factor (VIF) values of 1.230, 1.109, 1.150, 1.191, 1.118, and 1.115 for the selected indicators, all of which met the inclusion criteria for multivariate regression analysis. Consequently, all these variables were included in the subsequent variable selection and model development. A multivariate binary logistic regression model was then constructed. The results demonstrated that age, BMI, serum CA125, CA199, NLR, albumin level, and concomitant ovarian endometrioma were independent influencing factors for the occurrence of DIE (P<0.05) (Table 2).

Figure 1.

Two plots showing lasso coefficient screening and a lasso regression waterfall of rad score by patient. Image A displays a multi-line plot with ′Coefficients′ on the vertical axis and ′Log Lambda′ on the horizontal axis, ranging from -6 to -1. The vertical axis spans from -4 to 4. Coefficient paths begin near Log Lambda -6, moving towards 0 as Log Lambda increases. An upper curve starts at 1.1, declining to 0 near Log Lambda -2.2. Another starts at 0.5, also reaching 0 near Log Lambda -2.2. Lower curves start slightly below 0, rising to meet 0 near Log Lambda -2.2. A horizontal line at 0 is visible. Image B shows a vertical bar waterfall plot with ′Patient ID′ on the horizontal axis and ′Rad Score′ on the vertical axis. Patient IDs range from 0 to about 175. Rad scores range from -2 to 2. Bars are ordered from most negative to most positive. The leftmost bars reach -2.6, increasing towards 0, crossing near patient ID 85 to 95. Bars rise above 0, reaching 1.0 around patient ID 130, 1.5 around 155, 2.0 around 170, with the tallest bar at 2.8. A legend indicates two groups labeled 0 and 1.

Lasso coefficient screening plot (A) and waterfall plot (B).

Table 2.

Multivariate Logistic Regression Analysis for the Presence of DIE

Factor β SE Wald P OR 95%CI
Age −0.070 0.031 5.008 0.025 0.933 0.877–0.991
BMI −0.135 0.057 5.601 0.018 0.874 0.782–0.977
CA125 0.036 0.013 8.452 0.004 1.037 1.012–1.063
CA199 0.036 0.012 9.872 0.002 1.037 1.014–1.061
NLR 0.394 0.154 6.51 0.011 1.483 1.096–2.007
Albumin −0.165 0.055 8.933 0.003 0.848 0.761–0.945
Ovarian endometrioma 1.016 0.372 7.458 0.006 2.762 1.332–5.725

Predictive Performance of Machine Learning Models in the Training and Validation Sets

The Hosmer-Lemeshow test results indicated that all P-values for the models in both the training and validation sets exceeded 0.05, suggesting good agreement between the models’ predicted probabilities and the observed probabilities. The calibration performance met the requirements for clinical prediction models. In the training set, the χ2 values for the four models were 11.658, 4.603, 9.648, and 16.658, with corresponding P-values of 0.167, 0.799, 0.291, and 0.053, respectively. In the validation set, the χ2 values for the four models were 6.532, 8.575, 3.349, and 6.273, with corresponding P of 0.588, 0.379, 0.911, and 0.617, respectively. The calibration slopes for RF, GBM, SVM, and logistic regression were 1.07, 1.21, 0.88, and 0.94, respectively, with intercepts of 0.06, −0.22, 0.28, and 0.10. The Brier scores were 0.187, 0.203, 0.214, and 0.198, indicating good calibration for all models. Calibration metrics should be interpreted with caution given the relatively small validation sample size. (Figure 2 and Table 3).

Figure 2.

Two multi-line graphs showing calibration curves of observed versus predicted probability in two datasets.

Calibration curve analysis of machine learning-based DIE prediction models.

Table 3.

Diagnostic Performance and Calibration Test Results of Each Prediction Model in the Training and Validation Sets

Dataset Model Accuracy Specificity Mean
Absolute Error
Accuracy Sensitivity Specificity PPV NPV F1-score Hosmer-Lemeshow Test
χ2 P
Training Set RF 0.731 0.879 0.185 0.731 0.629 0.879 0.862 0.655 0.726 11.658 0.167
GBM 0.714 0.793 0.212 0.714 0.61 0.793 0.807 0.625 0.695 4.603 0.799
SVM 0.714 0.741 0.201 0.714 0.598 0.741 0.754 0.625 0.667 9.648 0.291
Logistic 0.731 0.638 0.199 0.731 0.641 0.638 0.657 0.671 0.647 16.658 0.053
Validation Set RF 0.714 0.821 0.184 0.714 0.622 0.821 0.767 0.689 0.687 6.532 0.588
GBM 0.679 0.821 0.219 0.679 0.568 0.821 0.778 0.66 0.657 8.575 0.379
SVM 0.643 0.750 0.233 0.643 0.541 0.750 0.667 0.633 0.597 3.349 0.911
Logistic 0.714 0.607 0.214 0.714 0.649 0.607 0.600 0.696 0.623 6.273 0.617

ROC curve analysis revealed that, in the training set, the AUC values for the RF, GBM, SVM, and conventional Logistic regression models were 0.794, 0.757, 0.756, and 0.728, respectively. Their corresponding accuracy values were 0.731, 0.714, 0.714, and 0.731, and specificity values were 0.879, 0.793, 0.741, and 0.638, respectively. In the internal validation set, the AUC values for the four aforementioned models were 0.787, 0.740, 0.685, and 0.709, with accuracy values of 0.714, 0.679, 0.643, and 0.714, and specificity values of 0.821, 0.821, 0.750, and 0.607, respectively. Notably, no major performance degradation was observed after internal validation, suggesting reasonable stability within this single-center dataset. However, given the limited size of the validation set and its single-center origin, this finding should be interpreted cautiously (Figure 3 and Table 3). The performance metrics for all four models in both the training and validation sets were summarized in Table 3. DeLong’s test for pairwise AUC comparisons was performed in both training and validation sets. In the internal validation set, RF demonstrated significantly higher AUC than SVM (P = 0.018) and logistic regression (P = 0.036), but not significantly different from GBM (P = 0.107). In the training set, RF was significantly superior to all other three models, with P = 0.002 vs SVM, P = 0.005 vs GBM, and P = 0.001 vs logistic regression.

Figure 3.

ROC graphs compare four prediction models in training and validation. Image A shows a ROC graph for the Training set with x-axis as 1-Specificity (false positive rate) and y-axis as Sensitivity (true positive rate), both ranging from 0.0 to 1.0. A diagonal line runs from (0.0, 0.0) to (1.0, 1.0). Legend: RF AUC: 0.794 (95% CI: 0.714-0.874); GBM AUC: 0.757 (95% CI: 0.672-0.843); SVM AUC: 0.756 (95% CI: 0.670-0.842); Logistic AUC: 0.728 (95% CI: 0.637-0.820). Image B shows a ROC graph for the Validation set with similar axes and diagonal line. Legend: RF AUC: 0.787 (95% CI: 0.660-0.914); GBM AUC: 0.740 (95% CI: 0.601-0.879); SVM AUC: 0.685 (95% CI: 0.541-0.829); Logistic AUC: 0.709 (95% CI: 0.567-0.851).

ROC curve analysis of machine learning-based DIE prediction models.

Decision Curve Analysis of Machine Learning Models

In the validation set, the RF model demonstrated a higher net benefit than the other models across threshold probabilities between 0.2 and 0.6. Within this range, the net benefit of the RF model ranged from 0.05 to 0.15, suggesting that using the model to guide referral decisions could reduce unnecessary procedures while maintaining acceptable detection rates. However, the clinical value of the model is currently limited to the specific scenario of differentiating DIE among patients with suspected endometriosis, and it should be interpreted as a supplement to rather than a replacement for expert imaging assessment. (Figure 4).

Figure 4.

Two line graphs showing standardized net benefit for prediction models across high risk thresholds. The image A showing a line graph labeled, Training set. The x-axis label is High Risk Threshold with range 0.0 to 1.0. The y-axis label is Standardized Net Benefit with range 0.0 to 1.0. A second x-axis label is Cost:Benefit Ratio with tick labels 1:100, 1:4, 2:3, 3:2, 4:1, 100:1. Legend labels are RF, GBM, SVM, Logistic, All, None. All model curves start near (0.0, 1.0) and decline toward (1.0, 0.0). The None line is horizontal at y equals 0.0. The image B showing a line graph labeled, Validation set. The x-axis label is High Risk Threshold with range 0.0 to 1.0. The y-axis label is Standardized Net Benefit with range negative 0.2 to 1.0. A second x-axis label is Cost:Benefit Ratio with tick labels 1:100, 1:4, 2:3, 3:2, 4:1, 100:1. Legend labels are RF, GBM, SVM, Logistic, All, None. Curves start near (0.0, 1.0) and decline; several cross near y equals 0.0 around high risk threshold about 0.8 to 0.9. The None line is horizontal at y equals 0.0.

Decision curve analysis of machine learning-based DIE prediction models.

The error rate plot of the RF model showed a rapid decline in the out-of-bag (OOB) error rate, which eventually stabilized at a very low level. This observation reflects the strong generalization ability of the RF model; even when evaluated using OOB data, the error rate remained low and stable (Figure 5). The SHAP variable importance plot illustrates the contribution of each variable to the model (Figure 6). The SHAP values reflect the impact of each variable on the model’s predicted probability of DIE, with the direction and magnitude of contribution varying across individuals. Among the seven predictors, BMI and CA125 showed relatively larger SHAP magnitudes, suggesting stronger influence on model predictions, while age and NLR demonstrated comparatively smaller contributions. This analysis is intended to enhance model interpretability rather than to establish causal relationships, and the clinical utility of SHAP-derived feature importance requires further investigation in prospective studies.

Figure 5.

A multi-line graph showing error rate versus trees for an RF model with three error curves.

Error rate plot of the RF model.

Figure 6.

A scatter plot showing SHAP value distributions for BMI, CA125, ovarian endometrioma, CA199, albumin, NLR and age. A scatter plot displays SHAP values with a horizontal axis labeled ′SHAP value′ ranging from -1 to 1. The vertical axis lists seven categories: BMI, CA125, Ovarian endometrioma, CA199, Albumin, NLR and Age. A reference line is at SHAP value 0. A color scale on the right indicates ′Feature value′ from High to Low. For BMI, points range from -1.2 to 1.5, clustering left of 0 and above 1. CA125 spans -0.7 to 1.5, with a dense cluster left of 0 and a smaller group near 1 to 1.5. Ovarian endometrioma ranges from -0.8 to 0.8, with clusters on both sides of 0. CA199 spans -0.7 to 1.5, with many points near -0.5 to 0.2 and a group around 0.7 to 1.5. Albumin ranges from -1.3 to 0.8, with points around -0.6 to 0.4. NLR spans -0.4 to 1.5, with a dense cluster near -0.2 to 0.2 and some points beyond 1. Age points are concentrated near 0, spanning -0.4 to 0.3.

Shap variable importance plot.

Discussion

The results demonstrated that the RF model outperformed the other models in terms of discrimination, calibration, and clinical net benefit. Independent predictors of DIE included age, BMI, serum levels of CA125 and CA199, NLR, albumin level, and the presence of ovarian endometrioma. While these associations are biologically plausible, the current study design does not permit mechanistic conclusions, and these interpretations should be viewed as hypothesis-generating. Although these predictors are individually known to be associated with endometriosis severity, their integration into a composite model that provides a standardized, quantitative probability estimate represents the main added value of this study.

Elevated serum CA125 level is a classic biomarker for DIE.17 CA125 is primarily secreted by coelomic epithelial cells upon inflammatory or mechanical stimulation. DIE lesions, which infiltrate to a depth exceeding 5 mm, often involve the pelvic peritoneum and serosal layers, inducing a robust local inflammatory response and peritoneal irritation. Consequently, CA125 is released into the bloodstream.18 In the present study, serum CA125 levels were significantly higher in the DIE group than in the non-DIE group. However, CA125 is not a specific marker for DIE; elevated levels can also occur in patients with ovarian endometrioma or pelvic inflammatory disease. Therefore, the diagnostic accuracy of CA125 alone for DIE remains limited.19

Serum CA199 levels were also significantly elevated in the DIE group. CA199 is a common biomarker for gastrointestinal malignancies. Nevertheless, in the context of endometriosis, when lesions invade pelvic organs such as the rectum, sigmoid colon, or ureters, local tissue injury and repair processes can induce CA199 expression in epithelial cells.19 Patients with DIE involving the bowel or urinary tract exhibit markedly higher serum CA199 levels than those without such involvement.20 Although the present study did not directly confirm a correlation between CA199 elevation and specific sites of organ involvement, the findings suggest that elevated CA199 may serve as an indirect indicator of DIE affecting deep pelvic organs.

The NLR is a composite marker reflecting systemic inflammatory status. DIE is recognized as a chronic inflammatory disease. Ectopic endometrial tissue undergoes repeated bleeding and necrosis within the pelvic cavity, activating macrophages and neutrophils and releasing multiple pro-inflammatory cytokines.21 Elevated neutrophil counts accompanied by relative lymphopenia result in an increased NLR. This ratio remains relatively stable and is less influenced by acute factors such as hydration status.22

Reduced albumin level represents another noteworthy predictive factor. Albumin is synthesized by the liver, and its level is influenced by both nutritional status and inflammatory state.23 Patients with DIE often experience chronic pain, gastrointestinal symptoms, and potential intestinal malabsorption, leading to inadequate protein intake or increased protein catabolism. Furthermore, chronic inflammation suppresses albumin gene transcription through inflammatory cytokines such as tumor necrosis factor-alpha and interleukin-6, further decreasing serum albumin levels.24

In this study, patients in the DIE group were younger and had lower BMI compared with those in the non-DIE group. Younger women have a relatively compact pelvic anatomy and higher estrogen levels, which may create favorable conditions for aggressive DIE growth. Low BMI may be related to two factors: (1) weight loss resulting from DIE-related gastrointestinal symptoms and chronic pain, and (2) potential effects of hormones secreted by adipose tissue, such as leptin, on the development of endometriosis.25 In contrast, other studies have reported opposite conclusions. These discrepancies may be attributable to differences in the composition of control groups across studies.26 The control group in the present study included patients with ovarian endometrioma, a condition often associated with higher BMI. Consequently, the intergroup comparisons warrant cautious interpretation.

Ovarian endometrioma is one of the most common comorbidities of DIE. In the present study, more than half of the patients with DIE also had ovarian endometrioma. From an anatomical and pathogenetic perspective, endometrial tissue released upon rupture of an ovarian endometrioma can implant onto the posterior pelvic compartment, promoting the formation of DIE at sites such as the uterosacral ligaments and the rectovaginal septum.27 Therefore, when ovarian endometrioma is clinically identified, a high index of suspicion for concurrent DIE is warranted, and further imaging evaluation should be considered when necessary.

The strength of this study lies in its systematic comparison of three mainstream machine learning algorithms using routine clinical, imaging, and laboratory indicators, coupled with internal validation. We acknowledge that several recent machine-learning studies have applied similar analytical pipelines to endometriosis prediction. Our model distinguishes itself by three aspects. First, it is specifically designed for DIE—the most severe phenotypic subtype—rather than general endometriosis or ovarian endometrioma. Second, it relies exclusively on routine clinical, laboratory, and basic ultrasound variables that are widely accessible across different healthcare settings. Third, it provides a standardized, quantitative probability estimate for DIE that can assist physicians in outpatient or primary care settings when expert imaging is unavailable or inconclusive.

This study has several limitations. First, the data were retrospectively collected from a single center. Although the sample size met the basic requirements for machine learning modeling, the events-per-variable approach used for sample size estimation is more suited to conventional regression than to comparing and tuning multiple machine learning algorithms, and the internal validation set contained only 75 patients, including 37 DIE cases, which may limit the precision of performance estimates. Selection bias and information bias remain possible. Second, and most critically, only internal validation was performed; an independent external validation dataset was lacking. Consequently, the generalizability of the model across different populations, healthcare centers, and geographic regions remains uncertain. Third, imaging variables were confined to transvaginal ultrasound findings of ovarian endometrioma and ureteral dilation, whereas a broader set of detailed imaging features—including lesion location, uterosacral ligament involvement, rectovaginal septum involvement, bowel or bladder infiltration, nodule size, and MRI-specific signs—was not incorporated, even though these parameters are well established as highly informative for DIE diagnosis in expert ultrasound or MRI settings. This constrains the model’s scope considerably, given that comprehensive imaging assessment remains the cornerstone of current clinical DIE evaluation. Fourth, the control group comprised patients with endometriosis but without DIE during the same period, rather than healthy individuals. Thus, the model is primarily applicable for further identifying the DIE subtype among patients already highly suspected of having endometriosis, rather than serving as a screening tool in the general population. Additionally, the study timeframe (2020–2025) supports the development and internal validation of a diagnostic prediction model based on surgical and pathological outcomes, but is insufficient to assess long-term clinical utility, impact on clinical decision-making, or patient outcomes. Therefore, the model should be interpreted as exploratory at this stage.

If validated externally, such noninvasive prediction models could eventually support risk stratification and referral decisions in resource-limited settings where expert imaging is unavailable. However, these potential applications remain speculative at this stage. Future research should focus on external validation, comparison with expert imaging-based diagnostic pathways, and prospective assessment of clinical impact before any implementation can be considered.

Conclusions

In this retrospective single-center exploratory study, the RF model demonstrated moderate predictive performance for noninvasive DIE identification using routine clinical and laboratory variables. The model was developed for differentiating DIE from non-DIE endometriosis among patients with surgically confirmed endometriosis, rather than for general population screening or initial diagnosis. The intended clinical scenario is to assist physicians in outpatient or primary care settings where expert ultrasound or MRI is unavailable or inconclusive, by providing a standardized probability estimate to support referral decisions. However, the model has only been internally validated, and its performance, generalizability, and added clinical value require further assessment. External validation in independent cohorts, comparison with expert imaging-based diagnostic pathways, and prospective evaluation are prerequisites before any clinical implementation can be considered.

Funding Statement

There is no funding to report.

Data Sharing Statement

The data used and/or analysed during the current study available from the corresponding author on reasonable request.

Ethics Approval and Consent to Participate

The study was approved by the Ethics Committee of Hangzhou Red Cross Hospital (No. HZ-审-03-65). The approval fully covered retrospective data extraction from electronic medical records. Informed consent was obtained from all patients. This study was conducted in accordance with the Declaration of Helsinki.

Author Contributions

All authors made a significant contribution to the work reported, whether that is in the conception, study design, execution, acquisition of data, analysis and interpretation, or in all these areas; took part in drafting, revising or critically reviewing the article; gave final approval of the version to be published; have agreed on the journal to which the article has been submitted; and agree to be accountable for all aspects of the work.

Disclosure

The authors declare that they have no competing interests.

References

  • 1.O’leary M, Neary C, Lawrence E. The diagnostic accuracy of magnetic resonance imaging versus transvaginal ultrasound in deep infiltrating endometriosis and their impact on surgical Decision-Making: a systematic review. Diagnostics. 2025;15(22). doi: 10.3390/diagnostics15222856 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Kim HJ, Lee EJ, Hong SS, et al. Comprehensive review of endometriosis based on imaging findings: what radiologists need to know. J Korean Soc Radiol. 2025;86(5):720–15. doi: 10.3348/jksr.2024.0104 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Ottolina J, Villanacci R, D’alessandro S, et al. Endometriosis and adenomyosis: modern concepts of their clinical outcomes, Treatment, and management. J Clin Med. 2024;13(14):3996. doi: 10.3390/jcm13143996 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Guerriero S, Saba L, Pascual M A, et al. Transvaginal ultrasound vs magnetic resonance imaging for diagnosing deep infiltrating endometriosis: systematic review and meta-analysis. Ultrasound Obstet Gynecol. 2018;51(5):586–595. [DOI] [PubMed] [Google Scholar]
  • 5.Chen Q, Jia L, Wang S, et al. Douglas pouch fluid improves the accuracy of transvaginal ultrasound in the diagnosis of uterosacral ligaments deep infiltration endometriosis: a prospective study. J Ultrasound Med. 2025;44(1):111–117. [DOI] [PubMed] [Google Scholar]
  • 6.Perelló M, Martínez-Zamora M A, Torres X, et al. Markers of deep infiltrating endometriosis in patients with ovarian endometrioma: a predictive model. Eur J Obstet, Gynecol, Reprod Biol. 2017;209:55–60. [DOI] [PubMed] [Google Scholar]
  • 7.Arfi A, Bendifallah S, D’argent EM, et al. Nomogram predicting the likelihood of live-birth rate after surgery for deep infiltrating endometriosis without bowel involvement in women who wish to conceive: a retrospective study. Eur J Obstet, Gynecol, Reprod Biol. 2019;235:81–87. [DOI] [PubMed] [Google Scholar]
  • 8.Xu J, Zhang A, Zheng Z, Cao J, Zhang X. Development and validation an AI model to improve the diagnosis of deep infiltrating endometriosis for Junior Sonologists. Ultrasound Med Biol. 2025;51(7):1143–1147. doi: 10.1016/j.ultrasmedbio.2025.03.012 [DOI] [PubMed] [Google Scholar]
  • 9.Peluso S, Lucidi V, Di Giovanni M C, et al. Artificial intelligence-enhanced MRI radiomics for discriminating active and fibrotic lesions to Support therapeutic Decision Making in deep endometriosis. J Minim Invasive Gynecol. 2026;33:778–786. doi: 10.1016/j.jmig.2025.12.037 [DOI] [PubMed] [Google Scholar]
  • 10.Shi S, Huang C, Tang X, et al. Identification and verification of diagnostic biomarkers for deep infiltrating endometriosis based on machine learning algorithms. J Biol Eng. 2024;18(1):70. doi: 10.1186/s13036-024-00466-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.She J, Su D, Diao R, et al. A joint model of Random Forest and artificial neural network for the diagnosis of endometriosis. Front Genet. 2022;13:848116. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Zhang H, Zhang H, Yang H, et al. Machine learning-based integrated identification of predictive combined diagnostic biomarkers for endometriosis. Front Genet. 2023;14:1290036. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Zou L, Meng L, Xu Y, et al. Revealing the diagnostic value and immune infiltration of senescence-related genes in endometriosis: a combined single-cell and machine learning analysis. Front Pharmacol. 2023;14:1259467. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Zhang B, Lv X, Li D, et al. Diagnostic accuracy of machine learning for endometriosis: a systematic review and meta-analysis. Front Endocrinol. 2025;16:1735567. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Shrestha P, Shrestha B, Sherestha J, et al. Current status and future potential of machine learning in diagnostic imaging of endometriosis: a literature review. JNMA J Nepal Med Assoc. 2025;63(283):205–211. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Becker CM, Bokor A, Heikinheimo O, et al. ESHRE guideline: endometriosis. Hum Reprod Open. 2022;2022(2):hoac009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Abdul Karim A K, Abd Aziz N H, Md Zin R R, et al. The effect of surgical intervention of endometriosis to CA-125 and pain. Malays J Med Sci. 2020;27(6):7–14. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Shokrnejad-Namin T, Farzizadeh N, Najmi Z, et al. Evaluating the diagnostic potential of CA-125 and miRNA levels in endometriosis: a narrative review. Int J Gynaecol Obstet. 2026;172(3):1392–1429. [DOI] [PubMed] [Google Scholar]
  • 19.Chen T, Wei J L, Leng T, et al. The diagnostic value of the combination of hemoglobin, CA199, CA125, and HE4 in endometriosis. J Clin Lab Anal. 2021;35(9):e23947. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Dong Y, Wang L, Chen Y, et al. Malignant endometriosis of the rectovaginal septum: a case report. Asian J Surg. 2023;46(6):2626–2627. [DOI] [PubMed] [Google Scholar]
  • 21.Dominoni M, Pasquali M F, Musacchi V, et al. Neutrophil to lymphocytes ratio in deep infiltrating endometriosis as a new toll for clinical management. Sci Rep. 2024;14(1):7575. doi: 10.1038/s41598-024-58115-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Islam MM, Satici MO, Eroglu S E. Unraveling the clinical significance and prognostic value of the neutrophil-to-lymphocyte ratio, platelet-to-lymphocyte ratio, systemic immune-inflammation index, systemic inflammation response index, and delta neutrophil index: an extensive literature review. Turk J Emerg Med. 2024;24(1):8–19. doi: 10.4103/tjem.tjem_198_23 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Don BR, Kaysen G. Poor nutritional status and inflammation: serum albumin: relationship to inflammation and nutrition. Semin Dial. 2004;17(6):432–437. doi: 10.1111/j.0894-0959.2004.17603.x [DOI] [PubMed] [Google Scholar]
  • 24.Kim Y, Molnar M Z, Rattanasompattikul M, et al. Relative contributions of inflammation and inadequate protein intake to hypoalbuminemia in patients on maintenance hemodialysis. Int Urol Nephrol. 2013;45(1):215–227. doi: 10.1007/s11255-012-0170-8 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Martire FG, Giorgi M, D’abate C, et al. Deep infiltrating endometriosis in adolescence: early diagnosis and possible prevention of disease progression. J Clin Med. 2024;13(2):550. doi: 10.3390/jcm13020550 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Rowlands IJ, Hockey R, Abbott J A, et al. Body mass index and the diagnosis of endometriosis: findings from a national data linkage cohort study. Obes Res Clin Pract. 2022;16(3):235–241. [DOI] [PubMed] [Google Scholar]
  • 27.Koninckx PR, Fernandes R, Ussia A, et al. Pathogenesis based diagnosis and Treatment of endometriosis. Front Endocrinol. 2021;12:745548. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

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

Data Availability Statement

The data used and/or analysed during the current study available from the corresponding author on reasonable request.


Articles from International Journal of Women's Health are provided here courtesy of Dove Press

RESOURCES