An interpreting machine learning models to predict amputation risk in patients with diabetic foot ulcers: a multi-center study - Tao, Haoran; You, Lili; Huang, Yuhan; Chen, Yunxiang; Yan, Li; Liu, Dan; Xiao, Shan; Yuan, Bichai; Ren, Meng (Frontiers in Endocrinology, 2025)
BackgroundDiabetic foot ulcers (DFUs) constitute a significant complication among individuals with diabetes and serve as a primary cause of nontraumatic lower-extremity amputation (LEA) within this population. We aimed to develop machine learning (ML) models to predict the risk of LEA in DFU patients and used SHapley additive explanations (SHAPs) to interpret the model.MethodsIn this retrospective study, data from 1,035 patients with DFUs at Sun Yat-sen Memorial Hospital were utilized as the training cohort to develop the ML models. Data from 297 patients across multiple tertiary centers were used for external validation. We then used least absolute shrinkage and selection operator analysis to identify predictors of amputation. We developed five ML models [logistic regression (LR), support vector machine (SVM), random forest (RF), k-nearest neighbors (KNN) and extreme gradient boosting (XGBoost)] to predict LEA in DFU patients. The performance of these models was evaluated using several metrics, including the area under the receiver operating characteristic curve (AUC), decision curve analysis (DCA), precision, recall, accuracy, and F1 score. Finally, the SHAP method was used to ascertain the significance of the features and to interpret the model.ResultsIn the final cohort comprising 1332 individuals, 600 patients underwent amputation. Following hyperparameter optimization, the XGBoost model achieved the best amputation prediction performance with an accuracy of 0.94, a precision of 0.96, an F1 score of 0.94 and an AUC of 0.93 for the internal validation set on the basis of the 17 features. For the external validation set, the model attained an accuracy of 0.78, a precision of 0.93, an F1 score of 0.78, and an AUC of 0.83. Through SHAP analysis, we identified white blood cell counts, lymphocyte counts, and blood urea nitrogen levels as the model’s main predictors.ConclusionThe XGBoost algorithm-based prediction model can be used to dynamically estimate the risk of LEA in DFU patients, making it a valuable tool for preventing the progression of DFUs to amputation.