Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Endocrinol.

Sec. Cancer Endocrinology

This article is part of the Research TopicHarnessing Machine Learning for Enhanced Biomedical Diagnosis and Early Disease Detection: Bridging Data Science and HealthcareView all 4 articles

Development of Machine Learning Models for Predicting Postoperative Hyperglycemia in Non-Diabetic Gastric Cancer Patients: A Retrospective Cohort Study Analysis

Provisionally accepted
Nan  WangNan Wang1Jie  ZhangJie Zhang1Chaonan  FeiChaonan Fei2Ye  DingYe Ding2Li  YangLi Yang2Peibei  DuanPeibei Duan1*
  • 1School of Nursing, Nanjing University of Chinese Medicine, Nanjing, China
  • 2Jiangsu Province Hospital of Chinese Medicine, Nanjing, China

The final, formatted version of the article will be published soon.

Background: Postoperative 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. Methods: This 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. Results: The 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. Conclusion: A 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.

Keywords: Postoperative hyperglycemia, Non-diabetic patients, gastric cancer, Machinelearning, risk prediction, Perioperative management, Shap, SVM-radial

Received: 18 Aug 2025; Accepted: 27 Oct 2025.

Copyright: © 2025 Wang, Zhang, Fei, Ding, Yang and Duan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Peibei Duan, 20231005@njucm.edu.cn

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.