AUTHOR=Wang Nan , Zhang Jie , Fei Chaonan , Ding Ye , Yang Li , Duan Peibei TITLE=Development of machine learning models for predicting postoperative hyperglycemia in non-diabetic gastric cancer patients: a retrospective cohort study analysis JOURNAL=Frontiers in Endocrinology VOLUME=Volume 16 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/endocrinology/articles/10.3389/fendo.2025.1687745 DOI=10.3389/fendo.2025.1687745 ISSN=1664-2392 ABSTRACT=BackgroundPostoperative hyperglycemia (POH) is a common metabolic complication in non-diabetic patients undergoing surgery for gastric cancer, and it significantly increases the risk of adverse outcomes. However, current prediction models primarily rely on a limited set of perioperative variables and conventional statistical methods, which often lack accuracy and generalizability. This study aimed to develop and validate a machine learning-based model for the early prediction of POH risk in non-diabetic patients following radical gastrectomy.MethodsThis single-center, retrospective cohort study included 393 non-diabetic patients who underwent radical gastrectomy for gastric cancer between March 2021 and September 2024. A total of 38 perioperative clinical features covering preoperative, intraoperative, and early postoperative periods were collected. The primary outcome was POH, defined as a fasting venous plasma glucose level ≥ 7.8 mmol/L within 24 hours post-surgery. Nine machine learning algorithms, including Support Vector Machine with a radial basis function kernel (SVM-radial), Random Forest, XGBoost, and Logistic Regression, were developed and compared. Model performance was evaluated using accuracy, the area under the receiver operating characteristic curve (AUC), recall, and F1-score. Shapley Additive Explanations (SHAP) analysis was employed to interpret the model and identify key predictive factors.ResultsThe incidence of POH was 42.7%. Among all models, the SVM-radial model achieved the best test-set performance (AUC = 0.758, accuracy = 0.724, F1 = 0.743, recall = 0.750, Brier score = 0.186, calibration slope = 1.07).The model exhibited excellent discrimination, predictive accuracy, and probability calibration, indicating strong generalization capabilities and potential clinical utility. Seven key predictors were identified: operation duration, nutritional risk score, sex, surgical approach 2 (robotic surgery), preoperative fasting blood glucose, thrombosis risk score, and alkaline phosphatase. SHAP analysis confirmed the non-linear contributions of these features to POH risk and supported their interpretability for clinical decision-making.ConclusionA novel machine learning-based model, utilizing multi-dimensional perioperative features, can accurately predict the risk of POH in non-diabetic patients with gastric cancer. The SVM-radial model demonstrated superior predictive performance and clinical interpretability, providing a viable tool for early risk stratification and personalized glycemic management in the surgical setting.