Research Square · Nov 23, 2026
Development and Validation of a Machine Learning-Based Model for Predicting Diabetes Risk in the Health Screening Population of Lanzhou City
By Gou Y, Yang P, Tao L et al.
Objective To investigate the prevalence of diabetes and its associated risk factors among individuals undergoing health checkups at a hospital in Lanzhou, and to develop a diabetes risk prediction model based on traditional logistic regression and machine learning algorithms, thereby providing a scientific basis for the early screening and precise prevention and control of diabetes in the local population. Methods A total of 1,546 adults who underwent health checkups at the health examination center of a tertiary hospital in Lanzhou from January 2020 to December 2024 and met the inclusion and exclusion criteria were selected. Data collected included gender, age, body mass index (BMI), systolic blood pressure, diastolic blood pressure, fasting blood glucose, total cholesterol, triglycerides, low-density lipoprotein (LDL), and high-density lipoprotein (HDL). Intergroup comparisons were performed using the χ² test, t-test, or Mann–Whitney U test; variables found to be statistically significant in univariate analysis were included in forward stepwise logistic regression, and odds ratios (ORs) and 95% confidence intervals (CIs) were reported. The entire sample was randomly divided into a training set (1,082 cases) and a validation set (464 cases) in a 7:3 ratio. Category weight balancing was applied, and the classification threshold was optimized using the Joden index. The accuracy, precision, recall, F1 score, and AUC of the three models were compared. Results Among the 1,546 participants who underwent physical examinations, 89 cases of diabetes and 1,457 non-diabetic cases were identified, resulting in a diabetes detection rate of 5.76%. There were 973 males and 573 females. The diabetic group differed statistically from the non-diabetic group in terms of age, BMI, systolic blood pressure, diastolic blood pressure, total cholesterol, low-density lipoprotein (LDL), high-density lipoprotein (HDL), triglycerides, and fasting blood glucose levels (P < 0.05); specifically, the diabetic group had higher levels of age, BMI, blood pressure, total cholesterol, LDL, triglycerides, and fasting blood glucose, while HDL levels were lower. Multivariate logistic regression analysis showed that age (OR = 1.081, 95% CI: 1.053–1.109), BMI (OR = 1.101, 95% CI: 1.022–1.185), systolic blood pressure (OR = 1.025, 95% CI: 1.004–1.047), and triglycerides (OR = 1.195, 95% CI: 1.043–1.369) were positively associated with diabetes status, while HDL-C was a protective factor (OR = 0.306, 95% CI: 0.097–0.973); Gender did not reach the conventional level of statistical significance (P = 0.065) but was retained in the predictive model. On the validation set, the logistic regression AUC was 0.770, accuracy 0.793, precision 0.165, recall 0.630, and F1 score 0.262; the AUC for the Random Forest model was 0.733, with an accuracy of 0.655, precision of 0.120, recall of 0.778, and an F1 score of 0.208; the AUC for the XGBoost model was 0.725, with an accuracy of 0.728, precision of 0.133, recall of 0.667, and an F1 score of 0.222. Conclusion The diabetes detection rate among the health examination population in Lanzhou City was 5.76%. Age, BMI, systolic blood pressure, triglycerides, and HDL cholesterol were independently associated with diabetes status. Among the three models, logistic regression demonstrated the best overall predictive performance, while Random Forest achieved the highest recall rate and can serve as an auxiliary tool for initial screening. Fasting blood glucose is a core indicator for the diagnosis and screening of diabetes; however, due to overlap with the definition of the outcome, it was not included in the multivariate predictive models.