Introduction
Postmenopausal bleeding (PMB) is defined as any uterine bleeding occurring after menopause and accounts for approximately 5% of referrals for gynaecological evaluation [1]. The aetiology of PMB is heterogeneous and includes benign conditions such as endometrial atrophy, hormonal exposure, and polyps. Nevertheless, all women presenting with PMB who are not receiving hormone replacement therapy (HRT) should undergo further evaluation, as approximately 10% of cases are associated with endometrial cancer (EC) [2].
Endometrial cancer is the most common gynaecological malignancy in high-income countries, with a steadily rising global incidence [3]. Numerous risk factors have been identified, including obesity, diabetes, hypertension, polycystic ovarian syndrome, Lynch syndrome, and endometrial hyperplasia [4]. Definitive diagnosis requires histopathological confirmation, typically obtained via an outpatient endometrial biopsy.
Given the prognostic advantage of early-stage detection, there is a growing need for effective risk stratification strategies in women presenting with PMB. However, PMB is a non-specific symptom and is more frequently associated with benign conditions [5], making clinical decision-making challenging.
Several studies have attempted to develop predictive models for EC in women with PMB. One study identified recurrent vaginal bleeding, hypertension, endometrial thickness > 8 mm, and age > 65 years as key predictors and proposed a clinical decision-making algorithm [6]. Another study demonstrated that older age (> 70), diabetes, and nulliparity significantly increased the risk of complex hyperplasia or EC [7]. Additional work has highlighted age, body mass index (BMI), diabetes, and endometrial thickness as important predictors [8].
Despite these efforts, existing models are largely based on traditional statistical approaches and may not fully capture complex, non-linear relationships between clinical variables. Advances in machine learning (ML) provide an opportunity to improve predictive performance by leveraging high-dimensional clinical data.
Therefore, the aim of the present study was to develop and evaluate machine learning-based models for predicting the likelihood of EC in women presenting with PMB. Such models may enhance clinical risk stratification, support decision-making, and facilitate earlier diagnosis in high-risk patients.
Material and methods
Patients
This retrospective study included 617 women admitted to a day hospitalization setting for hysteroscopy due to PMB between 2014 and 2023 at the Meir Medical Center.
Inclusion criteria were women older than 50 years presenting with PMB. Women with vaginal bleeding not originating from the uterus were excluded.
For each patient, the following data were extracted:
demographic variables (age, BMI),
clinical variables (obstetric history, comorbidities),
laboratory data (complete blood count, biochemical profile, C-reactive protein, and tumour markers when available),
imaging findings (endometrial thickness, uterine size, and additional pathological findings),
pathology results.
Outcome measures
The primary outcome was the presence of endometrial cancer.
These data were used to train ML models to identify significant predictors and estimate the probability of endometrial malignancy.
Data analysis and preprocessing
Categorical variables are presented as counts and percentages, and continuous variables as mean (standard deviation). Statistical comparisons were performed using the Student t-test or χ2 test, as appropriate. A p-value < 0.05 was considered statistically significant. Analyses were conducted using SPSS® version 20.0 (SPSS Inc., Chicago, IL, USA).
Machine learning model
The dataset included 617 records, each with up to 36 variables, including age, BMI, gravidity, parity, comorbidities (hypertension, diabetes), HRT use, tamoxifen use, symptom duration, endometrial thickness, and laboratory results.
The target variable was the presence of endometrial cancer. Rows with missing target values were excluded, and remaining missing data were imputed using the median. The dataset was split into training (80%) and testing (20%) subsets using stratified sampling to preserve class distribution.
Models compared
Three models commonly used for tabular data were evaluated:
In addition, a majority-vote ensemble combining these classifiers was constructed.
Addressing class imbalance
Given the relatively low prevalence of endometrial cancer, class imbalance was addressed using synthetic minority oversampling technique (SMOTE), which generates synthetic minority samples based on feature space similarities.
Cross-validation and hyperparameter tuning
A manual five-fold cross-validation approach was used for hyperparameter tuning. In each fold, SMOTE was applied to the training subset, and model performance was evaluated using the area under the receiver operating characteristic curve (AUC-ROC) on the validation subset. The parameter set yielding the highest mean AUC was selected.
Final training and test evaluation
Following hyperparameter selection, each model was retrained on the full training dataset (after SMOTE application) and evaluated on the independent test set. Performance metrics included accuracy, precision, recall, F1-score, and ROC-AUC. The ensemble model generated final predictions using majority voting.
Results
A total of 617 women with PMB who underwent hysteroscopy were included. Of these, 72 (11.7%) were diagnosed with endometrial cancer.
eXtreme Gradient Boosting achieved the highest sensitivity (80%), making it the most effective model for detecting cancer cases, followed by LightGBM (13%), Random Forest (7%), and the ensemble model (7%) (Table 1).
Table 1
Test set results of the final model
| Model | Accuracy (%) | Precision (%) | Recall (%) | F1 (%) | AUC (%) |
|---|---|---|---|---|---|
| Random Forest | 85 | 17 | 7 | 10 | 79 |
| XGBoost | 65 | 23 | 80 | 36 | 79 |
| LightGBM | 84 | 22 | 13 | 17 | 77 |
| Ensemble | 83 | 12 | 7 | 9 | 79 |
Despite lower sensitivity, Random Forest and LightGBM demonstrated higher overall accuracy (85% and 84%, respectively) (Table 1). In contrast, XGBoost achieved an accuracy of 65%, reflecting its emphasis on minimizing false negatives.
The ensemble model favoured negative predictions and failed to detect most positive cases.
Clarification on results interpretation: sensitivity vs. accuracy
In the context of EC prediction, sensitivity (recall) is the most clinically relevant metric, as it reflects the model’s ability to correctly identify true positive cases. Minimizing false negatives is critical, as missed diagnoses may lead to delayed treatment and worse outcomes.
Although XGBoost demonstrated lower overall accuracy, its superior sensitivity makes it more suitable for clinical application. False positives, while more frequent, can be addressed through additional diagnostic evaluation, whereas false negatives carry a greater clinical risk.
Accordingly, prioritizing sensitivity over accuracy represents an appropriate trade-off in this setting.
The most influential variables in the XGBoost model were tamoxifen exposure (importance 0.26), HRT use (0.129), age (0.11), hypertension (0.11), gravidity (0.10), parity (0.08), endometrial thickness (0.07), diabetes (0.06), and duration of bleeding (0.04).
Figure 1 presents the ROC curves for the evaluated models. Feature importance and SHAP (SHapley Additive exPlanations) summary plots are presented in Figure 2.
Figure 2
SHapley Additive exPlanations summary plot
Each point represents a patient; the x-axis shows SHapley Additive exPlanations values (impact on model output), and the y-axis lists features by importance

Given the clinical implications of missed cancer diagnoses, XGBoost is the preferred model. Its high sensitivity supports its use in settings where additional diagnostic testing is acceptable. The scale_pos_weight parameter was set to 2 to further emphasize minority class detection. Model calibration is presented in Figure 3, and decision curve analysis is presented in Figure 4.
Discussion
In this study, we developed and evaluated machine learning-based models to predict EC among women presenting with PMB, integrating demographic, clinical, laboratory, and imaging data. Among the evaluated models, XGBoost demonstrated the highest sensitivity, a particularly critical metric in oncologic prediction, where failure to identify true positive cases may result in delayed diagnosis and adverse outcomes. These findings highlight the potential of ML approaches to enhance clinical risk stratification beyond conventional methods.
From a clinical perspective, decision-making in women with PMB is inherently challenging due to the low specificity of this symptom for malignancy. While histopathological evaluation remains the gold standard for diagnosis, it is not always feasible to perform invasive diagnostic procedures in all patients at presentation. Therefore, there is a clear need for tools that can support early risk stratification and guide prioritization of diagnostic interventions. In this context, ML models offer a data-driven framework capable of integrating multiple variables simultaneously and capturing complex, non-linear relationships that may not be adequately addressed by traditional statistical models.
The predictive variables identified as most influential in our model – including tamoxifen exposure, HRT use, age, hypertension, gravidity, parity, endometrial thickness, diabetes, and duration of bleeding – are largely consistent with established risk factors for endometrial cancer. This concordance supports the clinical validity of the model while also demonstrating its ability to appropriately weigh the relative contribution of each factor.
Tamoxifen use emerged as the most influential predictor, which is consistent with its well-established association with endometrial pathology. As a selective oestrogen receptor modulator, tamoxifen exerts estrogenic effects on endometrial tissue, stimulating proliferation and increasing the risk of hyperplasia, atypia, and malignancy [9]. This effect is known to be dose- and duration-dependent, with prolonged exposure further elevating the risk, particularly in postmenopausal women [10]. The prominence of tamoxifen in our model underscores the importance of incorporating treatment-related exposures into risk prediction tools.
Similarly, the role of HRT in EC risk has been well documented, particularly in the context of unopposed oestrogen and certain regimens such as tibolone and sequential combined therapy [11]. The inclusion of HRT as a significant variable in our model aligns with these findings and reinforces its relevance in clinical risk assessment.
Hypertension and diabetes were also identified as important contributors. Although the biological mechanisms linking hypertension to EC remain incompletely understood, proposed pathways include the promotion of cellular senescence and inhibition of apoptosis [12, 13]. In contrast, hyperinsulinemia, commonly preceding type 2 diabetes, is thought to play a more direct role through mitogenic signalling and increased bioavailability of oestrogen due to reduced levels of sex hormone-binding globulin [4, 14, 15].
Endometrial thickness remains a key diagnostic parameter in the evaluation of PMB. Previous studies have demonstrated that, in symptomatic postmenopausal women, an endometrial thickness threshold of approximately 8 mm is associated with high diagnostic accuracy for EC [16]. The contribution of this variable to our model further supports its central role in clinical assessment.
Interestingly, parity and gravidity were also identified as contributing variables. However, it is important to emphasize that variables included in ML models do not necessarily represent independent causal risk factors. Rather, they may contribute to predictive performance through complex interactions with other variables, reflecting underlying patterns within the data.
Importantly, our findings should be interpreted in the context of existing predictive models. While prior studies have proposed risk-scoring systems based on selected clinical variables [6–8], these approaches are typically limited by linear assumptions and predefined interactions. In contrast, ML models, such as XGBoost, allow for more flexible modelling of high-dimensional data and may therefore provide improved predictive performance in complex clinical scenarios.
The clinical implications of this work lie in its potential application as a decision-support tool. A machine learning-based predictive calculator could be integrated into routine clinical workflows, enabling real-time estimation of individual risk of EC in women presenting with PMB. Such a tool may assist clinicians in identifying high-risk patients who would benefit from expedited diagnostic evaluation, while potentially reducing unnecessary invasive procedures in low-risk individuals.
This study has several strengths. It demonstrates the feasibility of applying ML techniques to routinely collected clinical data and provides a pragmatic framework for risk prediction in a real-world population of women undergoing hysteroscopy for PMB. Additionally, the use of multiple models and comparative evaluation enhances the robustness of the findings.
Limitation
However, several limitations should be acknowledged. First, the retrospective, single-centre design may limit the generalizability of the results to other populations and healthcare settings. Second, missing data were handled using median imputation, which does not account for potential correlations between variables and may introduce bias. Third, although SMOTE was used to address class imbalance, synthetic oversampling may affect model generalizability when applied to external datasets. Finally, external validation was not performed, and therefore the model’s performance in independent cohorts remains to be established.
Future research should focus on external validation across diverse populations, incorporation of additional clinically relevant variables, and prospective evaluation of model performance in real-world clinical settings. Further refinement of threshold selection and calibration may also enhance clinical applicability.
Conclusions
eXtreme Gradient Boosting demonstrated favourable performance in identifying women at risk for EC among those presenting with PMB, particularly due to its high sensitivity. While limitations in accuracy and generalizability remain, this study highlights the potential of machine learning-based approaches to support clinical decision-making and improve early detection of endometrial cancer.
In a real-world clinical setting, the XGBoost model demonstrated the ability to identify 80% of EC cases. Although limitations in accuracy and AUC remain, the model provides a practical approach for identifying high-risk patients.
In clinical practice, minimizing missed diagnoses is more critical than optimizing overall accuracy. Future improvements may include threshold optimization, incorporation of additional features, and expansion of the dataset to enhance predictive performance and reduce false-positive rates.


