Abstract
This study developed prediction models using 12 machine learning (ML) algorithms and, through comprehensive evaluation, selected the optimal model to predict postoperative urinary retention after gynecologic abdominal-pelvic surgery. An online calculator was created to provide reference for clinical decision-making and future research. The study included 1264 patients, with 436 from a temporal-spatial cohort. LASSO was used to select predictive factors, and SMOTENC oversampling and algorithm tuning were applied. The models were evaluated using AUC, accuracy, F1 score, specificity, recall, and DCA. The results showed that 161 out of 1264 patients (12.73%) developed urinary retention postoperatively. LASSO regression identified 8 key predictive factors: age, menopausal status, surgical method, postoperative analgesia, anesthesia type, POP-Q, surgical time, and intraoperative blood loss. The model based on the GBDT algorithm performed the best, with an AUC of 0.997 for the training set, 0.927 for the test set, and 0.710 and 0.676 for the external temporal-spatial validation. SHAP analysis of the GBDT model revealed that surgical time was the most significant factor for predicting urinary retention, followed by intraoperative blood loss, surgical method, and age. The study demonstrates that machine learning methods have significant advantages in predicting the risk of postoperative urinary retention after gynecologic abdominal-pelvic surgery. SHAP analysis and the online calculator can assist clinicians in assessing high-risk patients, providing valuable foundations for early screening and intervention.