Development and evaluation of explainable machine learning models for predicting prognosis in patients with primary biliary cholangitis
Abstract
Background This study aimed to develop, validate and evaluate interpretable machine learning models using clinical and laboratory data for prognosis prediction in patients with primary biliary cholangitis (PBC). Methods This study included 7905 patients treated for PBC. The cohort data were randomly divided into training and testing sets, with external validation using an additional 2372 patients. Six machine learning models are compared in this research (logistic regression (LR), random forest (RF),Extreme Random Trees (ET), Extreme Gradient Boosting (XGBoost), Lightweight Gradient Boosting Machine (LightGBM), and Multi-Layer Perceptron (MLP)). Feature importance and model interpretation were analyzed using the SHapley Additive exPlanations (SHAP) method. Results Ensemble tree models demonstrated significantly superior performance compared to traditional linear models and shallow neural networks in predicting PBC patient prognosis. Among these, the Extreme Random Tree model exhibited optimal predictive efficacy on both the training set (AUC = 0.9898) and external validation set (AUC = 0.9681), while the Random Forest model showed comparable performance with greater stability. At the patient level, SHAP’s force maps and decision trees provided clinically meaningful explanations for the et algorithm. The bilirubin_albumin_ratio emerged as the core feature for predicting PBC prognosis, with bilirubin, n_days, and prothrombin serving as key influencing factors. The influence patterns of these features align closely with clinical and pathological mechanisms. Conclusion The ET model constructed in this study enables precise prognosis prediction for PBC patients. After SHAP analysis, it demonstrates good interpretability. The key prognostic features identified by the model provide quantitative evidence for clinically assessing disease severity in PBC patients and offer data support for developing individualized clinical intervention plans.