This was a multicenter retrospective cohort study conducted in five tertiary Grade A hospitals in China. The population included 1498 adult inpatients with type 1 diabetes mellitus. The study developed and validated an interpretable machine learning model using routine inpatient data to predict in-hospital hypoglycemia; no specific comparator was reported.
The primary outcome was in-hospital hypoglycemia, which occurred in 580 out of 1498 patients (38.7%). The model's performance showed an AUC of 0.831 (95% CI: 0.798-0.873), a sensitivity of 0.793, a specificity of 0.748, and a Brier score of 0.149. The direction of association was positive with predictors.
Safety and tolerability data were not reported. Key limitations include the retrospective design, restriction to Chinese inpatients, and reliance on external validation without prospective validation. The study's practice relevance suggests the model may help identify high-risk patients early to guide targeted preventive interventions.
This is an observational study; associations do not imply causation. Results are based on a retrospective cohort, so certainty is limited by study design. Do not infer causation or generalize beyond Chinese inpatients with type 1 diabetes.
View Original Abstract ↓
In-hospital hypoglycemia remains a serious and potentially life-threatening complication among adults with type 1 diabetes mellitus (T1DM), yet reliable and interpretable prediction tools for Chinese inpatients are lacking. We aimed to develop and validate an interpretable machine learning model using multicenter inpatient data to predict the risk of in-hospital hypoglycemia in adults with T1DM, and to enhance clinical understanding of key predictors.
This multicenter retrospective cohort study enrolled adult inpatients with T1DM from five tertiary Grade A hospitals in China between January 1, 2019 and September 30, 2025. From the same multicenter cohort, the total dataset was randomly split 7:3 into a development set (n = 1,048) and an independent external validation set (n = 450). Within the development set, we performed 5-fold stratified cross-validation for hyperparameter tuning, and both internal cross-validation and external validation remained fully independent throughout model development. Machine learning models were trained to predict in-hospital hypoglycemia and evaluated for discrimination, calibration, clinical utility, and interpretability.
The study enrolled 1,498 patients, of whom 580 (38.7%) experienced in-hospital hypoglycemia. The random forest model demonstrated superior predictive performance in the external validation cohort, achieving an AUC of 0.831 (95% CI: 0.798-0.873), sensitivity of 0.793, specificity of 0.748, and a Brier score of 0.149. Hemoglobin, potassium, sodium, low-density lipoprotein cholesterol, and age at onset were identified as the top predictors. Hemoglobin, potassium, sodium, and BMI exhibited U-shaped associations with hypoglycemia risk, where both low and high values increased risk. Exploratory analysis of joint biomarker status showed that patients with abnormalities in two or more of these core predictors had a non-significant trend toward higher event rates, while the complexity of their combined effects was better captured by the non-linear model. The model enabled effective risk stratification into four quartiles, and decision curve analysis confirmed its consistent net clinical benefit across relevant probability thresholds.
The interpretable random forest model using routine inpatient data showed strong discrimination, good calibration and useful risk stratification for in-hospital hypoglycemia in Chinese adults with T1DM, which may help identify high-risk patients early and guide targeted preventive interventions in clinical practice.