Abstract
OBJECTIVE: To construct an eXtreme Gradient Boosting (XGBoost) model for predicting short-term recurrence after first-episode acute pancreatitis (AP) and employ SHapley Additive exPlanations (SHAP) analysis for feature interpretation. METHODS: A total of 442 patients with first-episode AP admitted to Cangzhou Central Hospital from October 2018 to June 2023 were retrospectively analyzed. The short-term recurrence was defined as a second attack after first-episode AP within 1 year. The cohort was split randomly, with 70% of the patients (n = 321) used for model training and 30% (n = 121) reserved for validation. Cox regression analysis was employed to identify independent predictors affecting recurrence, and an XGBoost model was constructed based on predictors. The XGBoost model was assessed by using area under the curve (AUC), calibration curve, decision curve analysis (DCA), and SHAP analysis. RESULTS: Three features were determined as predictors of recurrence. They included elevated triglycerides, alcohol drinking, and pancreatic necrosis. The XGBoost model demonstrated favorable performance, achieving an AUC of 0.933 (95% CI: 0.895-0.970) in the training cohort and of 0.874 (95% CI: 0.777-0.970) in the validation cohort. The calibration curve exhibited strong consistency between the anticipated and observed values, and DCA confirmed that the XGBoost model provided great clinical benefit. SHAP analysis also proved that elevated triglycerides, alcohol drinking, and pancreatic necrosis were decisive for the effect of the XGBoost model. CONCLUSION: The XGBoost model can accurately predict short-term recurrence. The SHAP approach can enhance the interpretability of the machine-learning model and support clinical decision-making.