Machine learning-based online prediction of nocturnal hypoglycemia in elderly patients with type 2 diabetes - Liu, Yuntong; Guo, Chenhua; Li, Xinyu; Li, Shen; Huang, Jiajun; Zhao, Liang; Zhu, Yan; Liu, Xuhan; Wang, Bing; Lin, Rui; Wang, Jingshi; Gao, Zhengnan; et al. (Frontiers in Endocrinology, 2026)
ContextNocturnal hypoglycemia (NH) is a common adverse event in elderly patients with type 2 diabetes (T2D). This study aims to develop a clinically applicable model for predicting the risk of NH in elderly patients with T2D.MethodsThis retrospective cohort study, conducted from May 2018 to June 2024, analyzed 1,128 elderly T2D patients undergoing continuous glucose monitoring, with an independent validation involving 100 outpatients. Clinical characteristics were collected, and feature engineering was performed to select a manageable set of clinically accessible features. An ensemble model was developed using multiple base models and a stacking approach. The best-performing model was deployed as an online risk calculator.ResultsOf the development set, 288 (25.5%) experienced NH, while 40 (40%) of the independent validation cohort experienced NH. The final ensemble model, “RF-ET-KNN”, combined random forest, Extra Trees, and K-nearest neighbor as base learners, with Extra Trees serving as the meta-learner. It incorporated eleven clinical features and achieved an AUROC of 0.926 and sensitivity of 0.853 on the test set, and an AUROC of 0.947 and sensitivity of 0.929 on the internal validation set. SHAP analysis identified that daytime lowest blood glucose (BG), fasting blood glucose (FBG), and daytime hypoglycemia events were closely related to NH. A user-friendly calculator is available at http://122.51.219.102:8000/.ConclusionThe “RF-ET-KNN” model, integrating eleven clinically accessible features, effectively predicts NH in elderly T2D patients. Daytime lowest BG, FBG, and daytime hypoglycemia events were significant risk factors.