Related Experiment Video
Updated: Jun 12, 2026

Laparoscopic Common Bile Duct Exploration in Patients with a Previous History of Biliary Tract Surgery
Published on: February 10, 2023
Machine learning models to predict the recurrence of common bile duct stones after ERCP
Xu Han1,2,3, Mujie Ye2, Ye Tian2
1Department of Gastroenterology, The First Affiliated Hospital with Nanjing Medical University, Nanjing, 210029, Jiangsu, China.
Objective:
To construct predictive models for the recurrence of common bile duct stones (CBDS) following endoscopic retrograde cholangiopancreatography (ERCP).
Methods:
This retrospective study analyzed data from 1,130 patients who were randomly divided into a training set (70%) and a test set (30%). Feature selection was performed using the boruta algorithm and multivariable logistic regression (LR), followed by addressing data imbalance through the Synthetic Minority Over-sampling Technique (SMOTE). Predictive models were developed utilizing random forest (RF), extreme gradient boosting (XGBoost), and LR. We optimized these models through random search and ten-fold cross-validation to identify the best parameters. After model development, we compared their area under the curve (AUC), accuracy, recall, precision, F1-score, and decision curve analysis (DCA) to select the most optimal model. Ultimately, the optimal model was interpreted using shapley additive explanations (SHAP).
Results:
Eight risk factors were identified and used to construct the predictive model, including clinical course, stone diameter, presence of multiple stones, use of biliary stents, alcohol consumption, history of biliary tract operations, presence of CBD stenosis, and endoscopic papillary balloon dilation. The RF model outperformed XGBoost and LR in terms of AUC, accuracy, recall, precision, F1-score, and DCA. The SHAP summary plot, waterfall plot, and force plot provided both overall and local explanations of the RF model.
Conclusion:
This study successfully identifies high-risk individuals for recurrent CBDS post-ERCP and offers valuable insights for machine learning-assisted clinical decision-making.