{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,23]],"date-time":"2026-09-23T05:16:27Z","timestamp":1790140587019,"version":"4.0.1"},"reference-count":20,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2025,9,17]],"date-time":"2025-09-17T00:00:00Z","timestamp":1758067200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Endocrinol."],"abstract":"<jats:sec><jats:title>Objective<\/jats:title><jats:p>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.<\/jats:p><\/jats:sec><jats:sec><jats:title>Methods<\/jats:title><jats:p>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 non-hypoglycemia 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.<\/jats:p><\/jats:sec><jats:sec><jats:title>Results<\/jats:title><jats:p>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.<\/jats:p><\/jats:sec><jats:sec><jats:title>Conclusions<\/jats:title><jats:p>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.<\/jats:p><\/jats:sec>","DOI":"10.3389\/fendo.2025.1634358","type":"journal-article","created":{"date-parts":[[2025,9,17]],"date-time":"2025-09-17T04:19:00Z","timestamp":1758082740000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":10,"title":["Machine learning-based prediction of hypoglycemia severity in hospitalized diabetic patients"],"prefix":"10.3389","volume":"16","author":[{"given":"Hongjian","family":"Jia","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jietao","family":"Zhang","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2025,9,17]]},"reference":[{"key":"B1","doi-asserted-by":"publisher","DOI":"10.1016\/S0140-6736(23)01301-6","article-title":"Global, regional, and national burden of diabetes from 1990 to 2021, with projections of prevalence to 2050: a systematic analysis for the Global Burden of Disease Study 2021","volume":"402","author":"Ong","year":"2023","journal-title":"Lancet (London, England)"},{"key":"B2","doi-asserted-by":"publisher","first-page":"16259","DOI":"10.1038\/s41598-023-43459-2","article-title":"Risk factors of severe hypoglycemia among patients with type 2 diabetes mellitus in outpatient clinic of tertiary hospital in Indonesia","volume":"13","author":"Yunir","year":"2023","journal-title":"Sci Rep"},{"key":"B3","doi-asserted-by":"publisher","DOI":"10.1530\/EC-15-0044","article-title":"Update on strategies limiting iatrogenic hypoglycemia","volume":"4","author":"Bonaventura","year":"2015","journal-title":"Endocr. Conn"},{"key":"B4","doi-asserted-by":"publisher","DOI":"10.1007\/s11739-018-1787-0","article-title":"Predictors of hypoglycemia in hospitalized patients with diabetes mellitus","volume":"13","author":"Akirov","year":"2018","journal-title":"Internal Emergency Med"},{"key":"B5","article-title":"Risk factors for hypoglycemia in patients with type 2 diabetes, hospitalized in internal medicine wards: Findings from the FADOI-DIAMOND study","author":"Borz\u00ec","year":"","journal-title":"Diabetes Res Clin Pract"},{"key":"B6","doi-asserted-by":"publisher","DOI":"10.1111\/dom.12689","article-title":"Rates and predictors of hypoglycaemia in 27\u2013585 people from 24 countries with insulin-treated type 1 and type 2 diabetes: the global HAT study","volume":"18","author":"Khunti","year":"2016","journal-title":"Diabetes Obes Metab"},{"key":"B7","doi-asserted-by":"publisher","first-page":"22741","DOI":"10.1038\/s41598-024-69844-z","article-title":"Enhancing severe hypoglycemia prediction in type 2 diabetes mellitus through multi-view co-training machine learning model for imbalanced dataset","volume":"14","author":"Agraz","year":"2024","journal-title":"Sci Rep"},{"key":"B8","doi-asserted-by":"publisher","DOI":"10.2196\/36176","article-title":"Machine learning prediction of hypoglycemia and hyperglycemia from electronic health records: algorithm development and validation","volume":"6","author":"Witte","year":"2022","journal-title":"JMIR Form. Res"},{"key":"B9","doi-asserted-by":"publisher","DOI":"10.1177\/19322968221103561","article-title":"Explainable machine learning for real-time hypoglycemia and hyperglycemia prediction and personalized control recommendations","volume":"18","author":"Duckworth","year":"2024","journal-title":"J Diabetes Sci Technol"},{"key":"B10","doi-asserted-by":"publisher","DOI":"10.1371\/journal.pmed.1004369","article-title":"A novel electronic health record-based, machine-learning model to predict severe hypoglycemia leading to hospitalizations in older adults with diabetes: A territory-wide cohort and modeling study","volume":"21","author":"Shi","year":"2024","journal-title":"PloS Med"},{"key":"B11","unstructured":"Interdisciplinary nursing research\n          \n          \n            \n              Niu\n              W\n            \n            \n              Liu\n              C\n            \n            \n              Wang\n              S\n            \n            \n              Zhang\n              R\n            \n            \n              Zhang\n              X\n            \n            \n              Jia\n              H"},{"key":"B12","doi-asserted-by":"publisher","DOI":"10.3390\/jpm12010067","article-title":"The risk factors of severe hypoglycemia in older patients with dementia and type 2 diabetes mellitus","volume":"12","author":"Chen","year":"2022","journal-title":"J Pers. Med"},{"key":"B13","doi-asserted-by":"publisher","first-page":"249","DOI":"10.1186\/s13098-023-01212-9","article-title":"Hypoglycemia in patients with type 2 diabetes mellitus during hospitalization: associated factors and prognostic value","volume":"15","author":"Gonz\u00e1lez-Vidal","year":"2023","journal-title":"Diabetol Metab Syndr"},{"key":"B14","doi-asserted-by":"publisher","DOI":"10.1007\/s11739-018-1787-0","article-title":"Predictors of hypoglycemia in hospitalized patients with diabetes mellitus","volume":"13","author":"Akirov","year":"2018","journal-title":"Intern Emerg Med"},{"key":"B15","doi-asserted-by":"publisher","DOI":"10.2337\/dc13-0610","article-title":"HbA1c and risk of severe hypoglycemia in type 2 diabetes","volume":"36","author":"Lipska","year":"2013","journal-title":"Diabetes Care"},{"key":"B16","doi-asserted-by":"publisher","DOI":"10.1016\/j.heliyon.2020.e03913","article-title":"The risk factors of inpatient hypoglycemia: A systematic review","volume":"6","author":"Pratiwi","year":"2020","journal-title":"Heliyon"},{"key":"B17","doi-asserted-by":"publisher","DOI":"10.1371\/journal.pone.0309618","article-title":"Prevalence and predictors of hypoglycemia in older outpatients with type 2 diabetes mellitus","volume":"19","author":"Al-Azayzih","year":"2024","journal-title":"PloS One"},{"key":"B18","doi-asserted-by":"publisher","DOI":"10.3389\/fendo.2024.1366184","article-title":"Predicting hypoglycemia in elderly inpatients with type 2 diabetes: the ADOCHBIU model","volume":"15","author":"Zhang","year":"2024","journal-title":"Front Endocrinol"},{"key":"B19","doi-asserted-by":"publisher","DOI":"10.2337\/dc19-1743","article-title":"Predicting the risk of inpatient hypoglycemia with machine learning using electronic health records","volume":"43","author":"Ruan","year":"2020","journal-title":"Diabetes Care"},{"key":"B20","doi-asserted-by":"publisher","DOI":"10.21203\/rs.3.rs-6619286\/v1","article-title":"Machine learning-based prediction of hypoglycemia severity in hospitalized diabetic patients","author":"Jia","year":"2025","journal-title":"Res Square"}],"container-title":["Frontiers in Endocrinology"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fendo.2025.1634358\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,9,17]],"date-time":"2025-09-17T04:19:05Z","timestamp":1758082745000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fendo.2025.1634358\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,9,17]]},"references-count":20,"alternative-id":["10.3389\/fendo.2025.1634358"],"URL":"https:\/\/doi.org\/10.3389\/fendo.2025.1634358","relation":{},"ISSN":["1664-2392"],"issn-type":[{"value":"1664-2392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,9,17]]},"article-number":"1634358"}}