ORIGINAL RESEARCH article
Front. Endocrinol.
Sec. Clinical Diabetes
Volume 16 - 2025 | doi: 10.3389/fendo.2025.1634358
This article is part of the Research TopicAI in Healthcare: Transforming Clinical Risk Prediction, Medical Large Language Models, and BeyondView all 6 articles
Machine Learning-Based Prediction of Hypoglycemia Severity in Hospitalized Diabetic Patients
Provisionally accepted- The Affiliated Hospital of Qingdao University, Qingdao, China
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Objective:To identify risk factors for hypoglycemia in hospitalized patients with type 2 diabetes mellitus (T2DM) and develop predictive models for hypoglycemia severity based on machine learning algorithms.Methods:Adult non-pregnant hospitalized patients diagnosed with T2DM were retrospectively enrolled from the electronic medical record system of the Affiliated Hospital of Qingdao University. Patients were categorized into hypoglycemia groups (mild, moderate-to-severe) or a nonhypoglycemia group based on inpatient venous plasma glucose levels. After data preprocessing, univariate and multivariate analyses were conducted to identify significant predictors. Three predictive models (XGBoost, Random Forest [RF], and Logistic Regression) were subsequently constructed and validated to evaluate their predictive performances.Results:From an initial cohort of 8,947 patients, 1,798 patients were included after data screening. Among the evaluated models, the RF model demonstrated the highest predictive accuracy (93.3%) and Kappa coefficient (0.873), followed by XGBoost (accuracy: 92.6%, Kappa: 0.860). Logistic regression exhibited comparatively lower performance (accuracy: 83.8%, Kappa: 0.685). The macro-average area under the ROC curve (AUC) values for RF, XGBoost, and logistic regression were 0.960, 0.955, and 0.788, respectively, highlighting the superior discriminative capability of the RF model. While both XGBoost and RF models identified glycemic control metrics and glucose variability as core predictors for hypoglycemia, the RF model additionally emphasized medication usage, whereas XGBoost prioritized basal metabolic parameters. Conclusions:The RF model outperformed XGBoost and conventional logistic regression in predicting hypoglycemia severity among hospitalized T2DM patients. The results emphasize the importance of closely monitoring glucose levels and glucose variability during diabetes management to prevent hypoglycemia. The developed model provides a foundation for implementing preventive strategies to reduce hypoglycemia occurrence in hospitalized patients with T2DM.
Keywords: type 2 diabetes mellitus, Hypoglycemia, risk prediction, machine learning, Clinical Analysis
Received: 24 May 2025; Accepted: 01 Sep 2025.
Copyright: © 2025 Jia and Zhang. 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: Jietao Zhang, The Affiliated Hospital of Qingdao University, Qingdao, China
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.