Conclusion
Building ML models to detect endometriosis based on basic demographic information, clinical characteristics, and laboratory indicators is a feasible approach with desirable performance. The sample size in this study was limited, and internal validation was performed using a random split of the dataset. Therefore, caution is still warranted regarding the validation performance and interpretation of this model.
1 Introduction
Endometriosis is a prevalent illness among women of reproductive age. It is typically defined as a chronic gynecological condition clinically leading to infertility, dysmenorrhea, and chronic non-menstrual pelvic pain (
). This illness affects 190 million women worldwide [approximately 5%-10% of women of child-bearing age ( , )]. It not only severely compromises the health of global women but also imposes a substantial burden on healthcare resources. Approximately 75.2% of patients reported having been misdiagnosed with other physical or mental health problems, with an average diagnostic delay of 8.6 years ( ). Delayed diagnosis is closely associated with the aggravation of endometriosis, often directly impacting the treatment and prognosis of the disease. Therefore, early and effective detection strategies are of significant clinical importance.The etiology of endometriosis is complex and multifactorial, and its exact cause remains uncertain. Recent in-depth research on endometriosis has uncovered that endometriosis is a chronic inflammatory process (
), which is believed to be associated with immune system dysfunction ( ). Endometriosis is a systemic disease with diverse manifestations ( ). Traditionally, laparoscopy and histopathology have been utilized for the definitive diagnosis of endometriosis ( ). Nonetheless, laparoscopy has limitations, such as surgical risks and dependence on visible pelvic lesions. The latest European Society of Human Reproduction and Embryology (ESHRE) Guideline on Endometriosis ( ) states that laparoscopy is no longer the gold standard for the diagnosis of endometriosis. It is now recommended only for patients with negative imaging results or those who have failed or are unsuitable for empirical treatment. Currently, preoperative diagnosis of endometriosis can be made by combining clinical symptoms, physical signs, imaging findings, and biomarkers. However, many endometriosis patients present with atypical clinical symptoms. Besides, gynecological examinations and imaging examinations are highly influenced by the examiner’s experience and technical proficiency. Although biomarkers like carbohydrate antigen 125 (CA125) are associated with endometriosis, their value for early diagnosis is limited. Elevated levels of these biomarkers are frequently detected in patients with ruptured ovarian chocolate cysts ( ), adenomyosis ( ), or ovarian cancer ( ). Consequently, non-invasive diagnosis remains a challenge at present.With recent advances in artificial intelligence (AI), machine learning (ML), the core technology in AI, has emerged as a powerful tool for processing clinical data, identifying underlying patterns, and constructing predictive models. ML has been applied in imaging analysis (
), biomarker screening ( ), interpretation of pathological images ( ), and prediction of disease progression ( ). It offers a novel method for non-invasive diagnosis, with the potential to reduce diagnostic delay, lower healthcare costs, and improve patients’ quality of life ( ). Therefore, our study leveraged basic information and biomarkers from endometriosis patients to develop and validate ML models for diagnosing endometriosis, aiming to provide a reference for early clinical diagnosis.2 Methods
2.1 Study population
We retrospectively collected data from female patients aged 18 years or older who received medical care at the First Hospital of Putian City, Fujian Province between January 2022 and February 2025. Women aged 18 years or older with a confirmed diagnosis of endometriosis (by surgery and postoperative pathology) were included. Pregnant women and individuals with missing outcome variables or too many missing variables were excluded. The study was conducted in strict compliance with the Declaration of Helsinki and received approval from the Institutional Ethics Committee of the First Hospital of Putian City (Approval No.: 2025-037). Given the retrospective design of this study, the Ethics Committee waived the requirement for informed consent.
2.2 Covariates and diagnosis of outcome events
Variables were collected from patients with endometriosis confirmed by surgery and postoperative pathology, including age, body mass index (BMI), occupation, age at menarche, family history of endometriosis, menopausal status, dysmenorrhea, non-menstrual abdominal pain, non-menstrual low back pain, pain during defecation, menstrual diarrhea or constipation, regularity of menstrual cycles, childbirth history (full-term birth, preterm birth), number of children, history of miscarriage, history of uterine fibroids, white blood cell (WBC) count, neutrophil percentage (NP), red blood cell (RBC) count, platelet count, D-dimer, fibrinogen (FIB), carcinoembryonic antigen (CEA), carbohydrate antigen 125 (CA125), carbohydrate antigen 199 (CA199), high-density lipoprotein (HDL), low-density lipoprotein (LDL), and lactate dehydrogenase (LDH). Among these, the history of uterine fibroids, as an ordinal categorical variable, was classified as “no history of uterine fibroids, “ “history of uterine fibroids with the largest previously diagnosed fibroid measuring < 5 cm in diameter (small fibroid), “ and “history of uterine fibroids with the largest previously diagnosed fibroid measuring ≥ 5 cm in diameter (large fibroid).” Fibroid diameter was determined based on records from previous ultrasound or magnetic resonance imaging (MRI) reports. In cases of multiple fibroids, the diameter of the largest fibroid was used for classification. Regarding the rationale for the 5 cm cutoff, there are no unified or widely accepted quantitative classification criteria for uterine fibroid size internationally (
). Previous studies used 5 cm as the clinical cutoff point to distinguish between small and large fibroids, including a meta-analysis of 24 studies ( ), a cohort study of 651 cases that stratified fibroid size by maximum diameter ( 10 cm) ( ), and a prospective cohort study that identified 5 cm as the optimal cutoff point via receiver operating characteristic (ROC) curve analysis ( ). Furthermore, there is a significant association between comorbid uterine fibroids and endometriosis ( , ), and a study has reported an association between small fibroids and severe endometriosis ( ). Based on the above evidence, this study adopted 5 cm as the cutoff value for fibroid size in medical histories.2.3 Imputation of missing values
In data processing, variables with over 20% missing values (
) were first excluded to reduce potential bias arising from excessive missing data and ensure the quality and accuracy of data analysis results. Subsequently, multiple imputation was applied to fill in the remaining missing data. During the imputation, we independently generated three datasets. All three datasets were subjected to modelling and validation, after which we extracted only the dataset with median performance and presented the complete analysis results based on that dataset. The multiple imputation procedure was performed using the MICE package in R.2.4 Statistical methods
Normally distributed quantitative data were described as mean ± standard deviation and compared between groups utilizing the independent sample t-test. Quantitative data with a skewed distribution were described as median (interquartile range) and compared between groups utilizing the Mann-Whitney U test. Categorical data were described as n (%) and compared between groups utilizing the chi-square test. Differences were considered statistically significant if P < 0.05.
Data were split into a training set and a validation set at a 7:3 ratio. Univariate and multivariate logistic regressions were employed within the training set to identify independent risk factors for endometriosis. Specifically, we first compared the distributions of variables between the endometriosis and non-endometriosis groups, and variables with P < 0.1 were included in multivariate stepwise logistic regression. Variables were then selected for multivariate analysis via stepwise logistic regression, with exclusion and inclusion criteria set at P > 0.1 and P < 0.05, respectively, to ultimately identify independent influencing factors. Based on these independent risk factors, logistic regression (LR), random forest (RF), support vector machine (SVM), and XGBoost models were constructed. Model accuracy was assessed using the area under the ROC curve (AUC), sensitivity, and specificity. For each ML algorithm, hyperparameters were tuned within a pre-specified search range using grid search (RF, SVM, XGBoost) or randomized search with 5-fold cross-validation on the training set. For XGBoost, we searched n_estimators ∈ {50–1000}, max_depth ∈ {3–10}, learning_rate ∈ {0.01–0.3}, subsample ∈ {0.6–1.0}, and colsample_bytree ∈ {0.6–1.0}, with L1/L2 regularization (alpha, lambda) included to penalize complexity. For RF, we tuned n_estimators and max_features. For SVM, we tuned C and kernel parameters (RBF gamma). Model calibration was evaluated using calibration curves. The clinical utility of the models was assessed using decision curves. We employed the Delong test to assess the statistical significance of differences in ROC curves across models in the validation set. Using LR as the reference, we conducted statistical comparisons of RF, SVM, and XGBoost, respectively, and applied the Bonferroni correction, adjusting the significance level to 0.017 (0.05/3).
Statistical analyses were performed using R v4.5.2. The following packages were used in the analysis: glmnet, pROC, mice, readxl, rmda, rms, xgboost, randomForest, e1071, and caret. A grid search approach was employed for parameter tuning during the analysis.
3 Results
3.1 Patient characteristics
A total of 233 participants were included, with a mean age of 41 years, a mean BMI of 23.47, and a mean age at menarche of 14 years. The training set comprised 163 participants, and the validation set comprised 70 participants. Among these participants, 120 had endometriosis, with 84 in the training set and 36 in the validation set (Table 1; Supplementary Figures S1–S13).
Table 1
| Factor | Training set (n=163) | Validation set (n=70) | Overall (n=233) |
|---|---|---|---|
| Age | 40.48 ± 12.62 | 42.83 ± 12.29 | 41.19 ± 12.54 |
| BMI | 23.37 ± 4.19 | 23.69 ± 3.49 | 23.47 ± 3.99 |
| Age at menarche | 14.13 ± 2.60 | 14.03 ± 1.14 | 14.1 ± 2.26 |
| Menopausal status | |||
| No | 133 (81.6) | 59 (84.3) | 192 (82.4) |
| Yes | 30 (18.4) | 11 (15.7) | 41 (17.6) |
| Dysmenorrhea | |||
| No | 128 (78.5) | 56 (80.0) | 184 (79.0) |
| Yes | 35 (21.5) | 14 (20.0) | 49 (21.0) |
| Menstrual abdominal pain | |||
| No | 162 (99.4) | 69 (98.6) | 231 (99.1) |
| Yes | 1 (0.6) | 1 (1.4) | 2 (0.9) |
| Menstrual low back pain | |||
| No | 163 (100.0) | 69 (98.6) | 232 (99.6) |
| Yes | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| Pain during defecation | |||
| No | 163 (100.0) | 70 (100.0) | 233 (100.0) |
| Menstrual diarrhea or constipation | |||
| No | 163 (100.0) | 70 (100.0) | 233 (100.0) |
| Regularity of menstrual cycles | |||
| No | 153 (93.9) | 67 (95.7) | 220 (94.4) |
| Yes | 10 (6.1) | 3 (4.3) | 13 (5.6) |
| History of full-term births | |||
| 0 | 32 (19.6) | 7 (10.0) | 39 (16.7) |
| 1 | 49 (30.1) | 24 (34.3) | 73 (31.3) |
| 2 | 65 (39.9) | 30 (42.9) | 95 (40.8) |
| 3 | 14 (8.6) | 6 (8.6) | 20 (8.6) |
| 4 | 2 (1.2) | 1 (1.4) | 3 (1.3) |
| 5 | 1 (0.6) | 0 (0.0) | 1 (0.4) |
| 6 | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| 7 | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| History of preterm births | |||
| No | 162 (99.4) | 70 (100.0) | 232 (99.6) |
| Yes | 1 (0.6) | 0 (0.0) | 1 (0.4) |
| History of miscarriages | |||
| 0 | 97 (59.5) | 34 (48.6) | 131 (56.2) |
| 1 | 38 (23.3) | 24 (34.3) | 62 (26.6) |
| 2 | 23 (14.1) | 9 (12.9) | 32 (13.7) |
| 3 | 3 (1.8) | 2 (2.9) | 5 (2.1) |
| 4 | 1 (0.6) | 0 (0.0) | 1 (0.4) |
| 6 | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| 7 | 1 (0.6) | 0 (0.0) | 1 (0.4) |
| Number of children | |||
| 0 | 32 (19.6) | 7 (10.0) | 39 (16.7) |
| 1 | 49 (30.1) | 24 (34.3) | 73 (31.3) |
| 2 | 65 (39.9) | 30 (42.9) | 95 (40.8) |
| 3 | 14 (8.6) | 6 (8.6) | 20 (8.6) |
| 4 | 2 (1.2) | 1 (1.4) | 3 (1.3) |
| 5 | 1 (0.6) | 0 (0.0) | 1 (0.4) |
| 6 | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| 7 | 0 (0.0) | 1 (1.4) | 1 (0.4) |
| History of uterine fibroids | |||
| 0 | 97 (59.5) | 36 (51.4) | 133 (57.1) |
| 1 | 51 (31.3) | 29 (41.4) | 80 (34.3) |
| 2 | 15 (9.2) | 5 (7.1) | 20 (8.6) |
| WBC count | 6.68 ± 2.08 | 6.82 ± 2.22 | 6.72 ± 2.12 |
| NP | 62.25 ± 10.09 | 64.06 ± 9.4 | 62.8 ± 9.9 |
| RBC count | 4.39 ± 0.45 | 4.43 ± 0.49 | 4.41 ± 0.46 |
| Platelet count | 276.71 ± 62.13 | 261.8 ± 60.75 | 272.23 ± 61.97 |
| D-dimer | 0.25 (0.19, 0.42) | 0.26 (0.19, 0.50) | 0.25 (0.19, 0.42) |
| FIB | 2.85 ± 0.9 | 3.01 ± 0.98 | 2.89 ± 0.92 |
| CEA | 1.07 (0.72, 1.75) | 1.15 (0.70, 1.75) | 1.11 (0.72, 1.75) |
| CA125 | 20.45 (11.46, 41.48) | 16.18 (11.44, 38.49) | 18.69 (11.45, 40.06) |
| CA199 | 12.87 (6.55, 23.26) | 12.54 (5.44, 24.62) | 12.87 (5.88, 40.02) |
| HDL | 1.56 ± 0.35 | 1.62 ± 0.38 | 1.58 ± 0.36 |
| LDL | 2.66 ± 0.77 | 2.8 ± 0.81 | 2.7 ± 0.78 |
| LDH | 183.6 ± 37.76 | 179.09 ± 41 | 182.24 ± 38.73 |
| Endometriosis | |||
| No | 79 (48.5) | 34 (48.6) | 113 (48.5) |
| Yes | 84 (51.5) | 36 (51.4) | 120 (51.5) |
Distribution of predictive factors in the training and validation sets.
0 = No history of uterine fibroids; 1 = History of uterine fibroids, with the largest previously diagnosed fibroid measuring < 5 cm in diameter (small fibroid); 2 = History of uterine fibroids, with the largest previously diagnosed fibroid measuring ≥ 5 cm in diameter (large fibroid). The basis of these cutoff values can be found in the Methods section.
3.2 Independent relevant factors
Our univariate analysis within the training set revealed significant differences between endometriosis and non-endometriosis participants in factors including menopausal status, dysmenorrhea, WBC count, CA125, and CA199 (P < 0.05). Differences between endometriosis and non-endometriosis participants in factors including history of uterine fibroids, FIB, LDL, and LDH showed P < 0.1, indicating marginal significance. These factors were all incorporated in the multivariate regression analysis. Stepwise multiple regression analysis uncovered that a history of uterine fibroids, menopausal status, dysmenorrhea, WBC count, CA125, and CA199 were independent influencing factors, with variance inflation factors (VIFs) of 1.086, 1.140, 1.010, 1.0367, 1.173, and 1.122, respectively (Tables 2, 3).
Table 2
| No | Factor | Endometriosis (n=84) | Non-Endometriosis (n=79) | Training set | Statistic | P |
|---|---|---|---|---|---|---|
| (n=163) | Statistic | P | ||||
| 1 | Age | 41.76 ± 15.82 | 39.29 ± 8.52 | 40.48 ± 12.62 | -1.253 | 0.212 |
| 2 | BMI | 23.59 ± 5.05 | 23.17 ± 3.2 | 23.37 ± 4.19 | -0.648 | 0.518 |
| 3 | Age at menarche | 14.23 ± 3.58 | 14.04 ± 1.06 | 14.13 ± 2.6 | -0.471 | 0.639 |
| 4 | Menopausal status | 21.481 | <0.001 | |||
| No | 80 (95.2) | 53 (67.1) | 133 (81.6) | |||
| Yes | 4 (4.8) | 26 (32.9) | 30 (18.4) | |||
| 5 | Dysmenorrhea | 20.848 | <0.001 | |||
| No | 54 (64.3) | 74 (93.7) | 128 (78.5) | |||
| Yes | 30 (35.7) | 5 (6.3) | 35 (21.5) | |||
| 6 | Menstrual abdominal pain | 0.946 | 1 | |||
| No | 83 (98.8) | 79 (100) | 162 (99.4) | |||
| Yes | 1 (1.2) | 0 (0) | 1 (0.6) | |||
| 7 | Menstrual low back pain | |||||
| No | 84 (100) | 79 (100) | 163 (100) | |||
| 8 | Pain during defecation | |||||
| No | 84 (100) | 79 (100) | 163 (100) | |||
| 9 | Menstrual diarrhea or constipation | |||||
| No | 84 (100) | 79 (100) | 163 (100) | |||
| 10 | Regularity of menstrual cycles | 6.311 | 0.18 | |||
| Yes | 75 (89.3) | 78 (98.7) | 153 (93.9) | |||
| No | 9 (10.7) | 1 (1.3) | 10 (6.1) | |||
| 11 | History of full-term births | 5.759 | 0.33 | |||
| 0 | 14 (16.7) | 18 (22.8) | 32 (19.6) | |||
| 1 | 27 (32.1) | 22 (27.8) | 49 (30.1) | |||
| 2 | 36 (42.9) | 29 (36.7) | 65 (39.9) | |||
| 3 | 5 (6) | 9 (11.4) | 14 (8.6) | |||
| 4 | 2 (2.4) | 0 (0) | 2 (1.2) | |||
| 5 | 0 (0) | 1 (1.3) | 1 (0.6) | |||
| 12 | History of preterm births | 1.07 | 0.485 | |||
| No | 84 (100) | 78 (98.7) | 162 (99.4) | |||
| Yes | 0 (0) | 1 (1.3) | 1 (0.6) | |||
| 13 | History of miscarriages | 2.318 | 0.804 | |||
| 0 | 50 (59.5) | 47 (59.5) | 97 (59.5) | |||
| 1 | 19 (22.6) | 19 (24.1) | 38 (23.3) | |||
| 2 | 12 (14.3) | 11 (13.9) | 23 (14.1) | |||
| 3 | 2 (2.4) | 1 (1.3) | 3 (1.8) | |||
| 4 | 0 (0) | 1 (1.3) | 1 (0.6) | |||
| 7 | 1 (1.2) | 0 (0) | 1 (0.6) | |||
| 14 | Number of children | 5.759 | 0.33 | |||
| 0 | 14 (16.7) | 18 (22.8) | 32 (19.6) | |||
| 1 | 27 (32.1) | 22 (27.8) | 49 (30.1) | |||
| 2 | 36 (42.9) | 29 (36.7) | 65 (39.9) | |||
| 3 | 5 (6) | 9 (11.4) | 14 (8.6) | |||
| 4 | 2 (2.4) | 0 (0) | 2 (1.2) | |||
| 5 | 0 (0) | 1 (1.3) | 1 (0.6) | |||
| 15 | History of uterine fibroids | 5.955 | 0.051 | |||
| No | 43 (51.2) | 54 (68.4) | 97 (59.5) | |||
| < 5cm | 30 (35.7) | 21 (26.6) | 51 (31.3) | |||
| ≥ 5 cm | 11 (13.1) | 4 (5.1) | 15 (9.2) | |||
| 16 | WBC count | 7.05 ± 2.22 | 6.33 ± 1.89 | 6.68 ± 2.08 | -2.259 | 0.025 |
| 17 | NP | 61.67 ± 11.47 | 62.8 ± 8.63 | 62.25 ± 10.09 | 0.71 | 0.479 |
| 18 | RBC count | 4.44 ± 0.45 | 4.35 ± 0.46 | 4.39 ± 0.45 | -1.167 | 0.245 |
| 19 | Platelet count | 277.47 ± 65 | 275.99 ± 59.69 | 276.71 ± 62.13 | -0.152 | 0.88 |
| 20 | D-dimer | 0.25 (0.19, 0.44) | 0.25 (0.19, 0.39) | 0.25 (0.19, 0.42) | -0.49 | 0.624 |
| 21 | FIB | 2.97 ± 1.01 | 2.73 ± 0.76 | 2.85 ± 0.9 | -1.752 | 0.082 |
| 22 | CEA | 1.13 (0.72, 1.74) | 1.04 (0.76, 1.78) | 1.07 (0.72, 1.75) | -0.159 | 0.873 |
| 23 | CA125 | 33.59 (22.63, 40.76) | 11.94 (8.63, 18.65) | 20.45 (11.46, 41.48) | -7.481 | <0.001 |
| 24 | CA199 | 17.47 (9.25, 1.74) | 8.95 (5.06, 16.42) | 12.87 (6.55, 23.26) | -3.954 | <0.001 |
| 25 | HDL | 1.52 ± 0.33 | 1.6 ± 0.37 | 1.56 ± 0.35 | 1.516 | 0.132 |
| 26 | LDL | 2.77 ± 0.86 | 2.54 ± 0.67 | 2.66 ± 0.77 | -1.913 | 0.057 |
| 27 | LDH | 189.29 ± 40.11 | 178.25 ± 34.8 | 183.6 ± 37.76 | -1.88 | 0.062 |
Statistical analysis of differences in factors between endometriosis and non-endometriosis participants.
Table 3
| Variable | B | Standard error | Wald | P | OR (95%CI) |
|---|---|---|---|---|---|
| Menopausal Status (Yes) | -1.405 | 0.535 | 6.901 | 0.009 | 0.245 (0.086 - 0.700) |
| Dysmenorrhea (Yes) | 1.713 | 0.534 | 10.293 | 0.001 | 5.545 (1.947 - 15.788) |
| History of uterine fibroids | 20.694 | <0.001 | |||
| History of uterine fibroids (< 5 cm) | 1.176 | 0.4 | 8.642 | 0.003 | 3.242 (1.480 - 7.101) |
| History of uterine fibroids (≥ 5 cm) | 2.908 | 0.698 | 17.366 | <0.001 | 18.318 (4.666 - 71.915) |
| WBC | -0.239 | 0.089 | 7.231 | 0.007 | 0.787 (0.661 - 0.937) |
| CA125 | 0.073 | 0.014 | 28.799 | <0.001 | 1.076 (1.047 - 1.105) |
| CA199 | 0.01 | 0.005 | 3.494 | 0.062 | 1.010 (1.0002 - 1.021) |
Variables with P < 0.1 in univariate analysis included in multivariate stepwise regression analysis.
3.3 Construction of machine learning models
Based on the above independent influencing factors, LR, RF, SVM, and XGBoost models were constructed, showing ROC values of 0.893 (95% CI: 0.844–0.941), 0.870 (95% CI: 0.813–0.926), 0.895 (95% CI: 0.843–0.948), and 0.987 (95% CI: 0.976–0.998), respectively (Figure 1; Table 4). The sensitivity and specificity corresponding to the optimal cutoff probability for the LR model were 0.893 and 0.747, respectively. The calibration curves demonstrated excellent calibration (Figure 2). The decision curves demonstrated a very broad range of probability thresholds for net benefit (Figure 3).
Figure 1
Table 4
| Model | Threshold | AUC | Sensitivity | Specificity | Precision | F1 | ACC | Intercept | Solpe |
|---|---|---|---|---|---|---|---|---|---|
| LR | 0.379 | 0.893 (0.844-0.941) | 0.893 | 0.747 | 0.789 | 0.838 | 0.822 | -0.002 | 0.975 |
| RF | 0.504 | 0.870 (0.813-0.926) | 0.810 | 0.924 | 0.919 | 0.861 | 0.865 | -0.048 | 0.997 |
| SVM | 0.455 | 0.895 (0.843-0.948) | 0.810 | 0.937 | 0.932 | 0.867 | 0.871 | -0.024 | 1.020 |
| XGBoost | 0.419 | 0.987 (0.976-0.998) | 0.940 | 0.937 | 0.940 | 0.940 | 0.939 | 0.056 | 0.984 |
Performance of various models in the training set.
Intercept and slope refer to the intercept and slope of the calibration curve.
Figure 2
Figure 3
3.4 Model validation
In the validation set, the AUC values for the LR, RF, SVM, and XGBoost models were 0.878 (95% CI: 0.793–0.962), 0.878 (95% CI: 0.795–0.960), 0.853 (95% CI: 0.764–0.941), and 0.860 (95% CI: 0.777–0.943), respectively. The results of the Delong test showed no significant differences in the AUCs between LR and RF (Delong test P = 1.000), between LR and SVM (Delong test P = 0.391), and between LR and XGBoost (Delong test P = 0.076). The sensitivity and specificity corresponding to the optimal cutoff probability for the LR model were 0.944 and 0.706, respectively. The sensitivity and specificity corresponding to the optimal cutoff probability for the RF model were 0.694 and 0.912, respectively. The sensitivity and specificity corresponding to the optimal cutoff probability for the XGBoost model were 0.722 and 0.794, respectively (Figure 1; Table 5). The calibration curves demonstrated excellent calibration (Figure 4). The decision curves revealed a broad range of probability thresholds for net benefit (Figure 5). Given the high accuracy of LR in the validation set, an LR-based nomogram was created for clinical application (Figure 6).
Table 5
| Model | Threshold | AUC | Sensitivity | Specificity | Precision | F1 | ACC | Intercept | Solpe |
|---|---|---|---|---|---|---|---|---|---|
| LR | 0.379 | 0.878 (0.793-0.962) | 0.944 | 0.706 | 0.773 | 0.850 | 0.829 | -0.008 | 1.039 |
| RF | 0.504 | 0.878 (0.795-0.960) | 0.694 | 0.912 | 0.893 | 0.781 | 0.800 | -0.005 | 1.003 |
| SVM | 0.455 | 0.853 (0.764-0.941) | 0.667 | 0.853 | 0.828 | 0.739 | 0.757 | 0.035 | 0.960 |
| XGBoost | 0.419 | 0.860 (0.777-0.943) | 0.722 | 0.794 | 0.788 | 0.754 | 0.757 | 0.040 | 0.899 |
Performance of various models in the validation set.
Figure 4
Figure 5
Figure 6
4 Discussion
The manifestations of endometriosis on computed tomography (CT) are nonspecific and may vary depending on the affected organ. However, for women presenting with nonspecific abdominal pain or those seeking emergency care for acute abdominal or pelvic pain of unknown cause, abdominal and pelvic CT may be considered the preferred imaging examination (
). Ultrasound is widely used for the screening and follow-up of endometriosis. However, its diagnostic efficacy for complex lesions, deep-seated lesions, and small-volume lesions remains limited. Besides, ultrasound is operator-dependent and slightly inferior to MRI in diagnostic accuracy. MRI offers excellent soft tissue contrast and is capable of multiplanar imaging while producing no ionizing radiation. It has become an essential diagnostic tool for complex endometriosis, particularly deep infiltrating endometriosis ( , ). However, the application of MRI is limited because of high equipment costs, long examination duration, and the influence of inflammation and fibrosis on the diagnostic results.Previous researchers have explored endometriosis models. Zhao et al. (
) have enrolled 106 endometriosis patients and 203 individuals without endometriosis. Using the RF algorithm, they have found that serum carbohydrate antigen 125 (CA125) combined with the neutrophil lymphocyte ratio (accuracy 78.16%, sensitivity 86.21%, AUC 0.85, P<0.05) is more effective for predicting endometriosis than CA125 alone (accuracy 78.16%, sensitivity 86.21%, AUC 0.85, P<0.05; AUC 0.82, P<0.05). Vodolazkaia et al. ( ) have analyzed 28 biomarkers in plasma samples from 232 patients with endometriosis and 121 individuals without endometriosis. They have randomly divided the data into a training set (235 cases) and a validation set (118 cases) to establish 4 models. These 4 models have predicted endometriosis not detected by ultrasound in the training dataset, with sensitivities ranging from 81% to 90%, specificities from 68% to 81%, positive predictive values (PPVs) from 81% to 90%, and negative predictive values (NPVs) from 68% to 81%. Meanwhile, the 4 models have been independently validated for predicting endometriosis not detected by ultrasound in the test dataset, with a same sensitivity of 82%, specificities ranging from 63% to 75%, PPVs from 75% to 82%, and NPVs from 68% to 81%.Most of the above studies on diagnostic models have focused on single-modality data with limited information, and the models are highly dependent on data quality. Poor data quality (e.g., missing values, blurred images) significantly impacts model performance. Integrated models based on multimodal data (such as blood and clinical data) rely less on the quality of single-modality data, which is conducive to enhancing model stability and avoiding misdiagnosis due to uncertainties of single-modality data. Tore et al. (
) have analyzed 627, 566 clinical cases (with a 0.82% prevalence of endometriosis) using XGBoost and developed an endometriosis diagnostic tool. They have identified age, infertility, uterine fibroids, anxiety, and allergic rhinitis as the top five most significant features of endometriosis through a SHapley Additive exPlanations (SHAP) analysis. Their model exhibits an AUC of 0.725, a specificity of 62.9%, a sensitivity of 68.6%, a PPV of 1.5%, and an NPV of 99.58%.Our study indicates that menopausal status, history of uterine fibroids, dysmenorrhea, WBC count, CA125, and CA199 are independent influencing factors for endometriosis. The origin of ectopic endometrium in endometriosis patients remains incompletely understood. A study has suggested that changes in the endometrium during the menstrual cycle are influenced by inflammatory responses (
). Although postmenopausal endometriosis shares the same immunochemical characteristics as premenopausal endometriosis and may be reactivated under the stimulation of estrogen, postmenopausal lesions appear less common, smaller in extent, and less active in most cases ( ). Both endometriosis and uterine fibroids are common conditions in women of reproductive age and are associated with estrogen. They are the two most common monoclonal benign tumors, affecting approximately 30% of women of reproductive age. Modern molecular technologies have profoundly impacted our understanding of these two conditions. Baranov et al. ( ) have compared the molecular mechanisms of endometriosis and uterine fibroids from a genetic perspective. They have examined similarities and differences between endometriosis and uterine fibroids in the early stages, particularly emphasizing the epigenetic regulation of their gene networks, gene expression, and pathological development. Another study ( ) has also indicated an association between the prevalence of symptomatic endometriosis and symptomatic uterine fibroids in women aged 35 or older. Abdominal pain caused by endometriosis is typically associated with chronic pelvic pain (cyclic and non-cyclic), dysmenorrhea, and pain during defecation and urination. A study on the mechanisms of chronic pain in women with endometriosis has identified a close association between the lesion and the alterations in the neural activity of the nervous system, along with a close association between nerves and inflammatory cells ( ).Research (
) has suggested that immune system dysfunction serves as a key driver in the development of endometrial lesions. Immune cells, such as neutrophils, macrophages, natural killer (NK) cells, and dendritic cells, may play specific roles in angiogenesis, growth, and invasion of endometriotic cells. However, there is currently no consensus on the association between peripheral blood WBC count and the risk of developing endometriosis. As a nonspecific marker, the total WBC count in peripheral blood includes both pro-inflammatory and immunoregulatory cell components. A study ( ) has revealed the co-existence of local immunosuppression and systemic inflammatory response in advanced ovarian endometriosis, suggesting that the relationship between peripheral blood counts and the disease is more complex than that described by the classical inflammatory model. Furthermore, another study ( ) has noted that the association between peripheral blood WBC count and endometriosis has not yet been fully explored, and the direction of the association varies across WBC subtypes. Studies by Chen et al. ( ) and Rokhjireh et al. ( ) have confirmed significantly elevated serum CA125 and CA199 levels in endometriosis patients compared to healthy controls.In our study, we constructed a more explainable LR model and less explainable RF, SVM, and XGBoost models. Although SHAP analysis may enhance explainability for these models, it remains challenging to quantify the relationship between varying levels of variables and outcome measures. In practical applications, models with higher explainability (e.g., LR, decision tree) are often preferred because they quantify the associations between variables and outcomes and function as disease-specific scoring tools. Models with higher explainability typically exhibit poorer accuracy, while those with lower explainability often demonstrate better accuracy. It was found in our study that the diagnostic performance of LR in the validation set was not markedly inferior to other models. Therefore, a predictive nomogram for LR was developed to facilitate its adoption in clinical practice.
Thus, constructing an ML model to identify endometriosis based on independent influencing factors, such as history of uterine fibroids, menopausal status, dysmenorrhea, WBC count, CA125, and CA199, is a feasible approach. In the validation set of our study, the AUC values for the LR, RF, SVM, and XGBoost models were 0.878 (0.793–0.962), 0.878 (0.795–0.960), 0.853 (0.764–0.941), and 0.860 (0.777–0.943), respectively. These results demonstrated the desirable accuracy of the models, indicating their suitability for early diagnosis of endometriosis.
5 Limitations of the study
Four major limitations in this study could be addressed in future research. First, there is currently no unified quantitative classification criteria for the size of uterine fibroids. Although the 5-cm cutoff used in this study has been widely adopted in recent literature (
– ), it remains somewhat subjective. Future studies may incorporate the diameter of uterine fibroids as a continuous variable into the model. Second, although the models for diagnosing endometriosis exhibit excellent accuracy, this single-center study only demonstrates the feasibility of the ML models as adjunctive diagnostic tools. The generalizability of the models needs to be externally validated through multicenter studies, which remains an ongoing focus in our subsequent work. Third, although the cases collected span a relatively broad period of time, the sample size remains limited, which may constrain the interpretation of results. Fourth, all endometriosis patients included in our study were confirmatively diagnosed by surgical pathology, and the number of endometriosis patients and non-endometriosis patients was approximately 1:1. In real-world settings, such a high prevalence would not be observed. Therefore, the model is biased toward women who have undergone preliminary outpatient examinations and laboratory tests and require surgery. Its generalizability to a broader population needs to be further validated. Fifth, since the total number of events in this study was small, the XGBoost model appeared to exhibit some degree of overfitting; therefore, the performance of the XGBoost model should be interpreted with caution. Furthermore, given the limited sample size in this study, LR represented a parsimonious and appropriate primary model that demonstrated superior AUC and sensitivity among the models constructed; therefore, we recommended the LR model. Finally, although we employed multiple imputation and generated several datasets, we ultimately presented in the manuscript only the analysis results for a single imputed dataset exhibiting median performance in the validation set, rather than pooling the results of all imputed datasets in accordance with Rubin’s rule. Consequently, these results may not fully reflect the uncertainty introduced by the imputation process, and the relevant conclusions should be interpreted with caution.6 Conclusion
Developing ML models based on explainable clinical features to identify endometriosis is a feasible approach that demonstrates promising results. These models provide guiding evidence for early screening of endometriosis in future clinical studies.
Statements
Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Ethics statement
The studies involving humans were approved by the First Hospital of Putian City (Approval No.: 2025-037). Given the retrospective design of this study, the Ethics Committee waived the requirement for informed consent. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required from the participants or the participants’ legal guardians/next of kin in accordance with the national legislation and institutional requirements.
Author contributions
LC: Investigation, Writing – review & editing, Supervision, Writing – original draft, Resources, Formal analysis, Methodology. XC: Conceptualization, Writing – review & editing.
Funding
The author(s) declared that financial support was not received for this work and/or its publication.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fendo.2026.1894495/full#supplementary-material
Supplementary Figure 1Distribution of age in the endometriosis and non-endometriosis groups.
Supplementary Figure 2Distribution of BMI in the endometriosis and non-endometriosis groups.
Supplementary Figure 3Distribution of WBC counts in the endometriosis and non-endometriosis groups.
Supplementary Figure 4Distribution of NP in the endometriosis and non-endometriosis groups.
Supplementary Figure 5Distribution of RBC counts in the endometriosis and non-endometriosis groups.
Supplementary Figure 6Distribution of platelet counts in the endometriosis and non-endometriosis groups.
Supplementary Figure 7Distribution of D-dimer in the endometriosis and non-endometriosis groups.
Supplementary Figure 8Distribution of FIB in the endometriosis and non-endometriosis groups.
Supplementary Figure 9Distribution of CEA in the endometriosis and non-endometriosis groups.
Supplementary Figure 10Distribution of CA125 in the endometriosis and non-endometriosis groups.
Supplementary Figure 11Distribution of CA199 in the endometriosis and non-endometriosis groups.
Supplementary Figure 12Distribution of HDL in the endometriosis and non-endometriosis groups.
Supplementary Figure 13Distribution of LDL in the endometriosis and non-endometriosis groups.
Supplementary Figure 14Distribution of LDH in the endometriosis and non-endometriosis groups.