Abstract
BACKGROUND: Endoscopic bile duct drainage is crucial for improving the survival and quality of life in patients with malignant biliary obstruction (MBO). This study aimed to identify key factors that affect postoperative survival in patients with MBO, develop a predictive model, and validate the performance of the model using external data. METHODS: Data were retrospectively collected from The First Hospital of Jiaxing (between 2013 and 2021), The Second Hospital of Jiaxing (between 2014 and 2021), and Affiliated Hospital of Shaanxi University of Traditional Chinese Medicine (between 2014 and 2021). Patient demographics, disease characteristics, and laboratory results of 337 patients were analyzed. Various machine learning models, including the gradient boosted survival tree, extreme gradient boosting (XGBoost), XGBoost accelerated failure time (XGBoost AFT), random survival forests, and Cox proportional hazards regression, were used. The model performance was assessed using the concordance index (C-index), and SHapley Additive exPlanations (SHAP) values were used to interpret the model. RESULTS: The XGBoost AFT model exhibited the best performance, with C-index values of 0.902, 0.722, and 0.705 for the training cohort, test cohort 1, and test cohort 2, respectively. The SHAP analysis revealed that distant metastasis, high total bilirubin level, prolonged prothrombin time, and high-level obstruction significantly impacted survival. A Kaplan-Meier survival analysis demonstrated that the model effectively stratified patients into the high-risk and low-risk groups. CONCLUSIONS: This study provides a robust model that can predict the postoperative survival in patients with MBO. This model was validated using external data, and the results offer valuable guidance for postoperative management and personalized treatment.