Multidimensional dietary assessment and interpretable machine learning models predict the risk of prediabetes/diabetes and osteoporosis comorbidity in older adults - ShangGuan, Yuwen; Ji, Kangkang; Lin, Zhenhao; He, Chenyiyi; Sim, Young-Je; Liu, Haobiao; Huang, Kunyi; Wu, Kunpeng; Yan, Litao; Xu, Kunyuan; Li, Huan (Frontiers in Nutrition, 2025)
BackgroundThe health burden of diabetes mellitus and osteoporosis (DM-OP) comorbidity in the aging population is increasing, and dietary factors are modifiable risk determinants. This study developed and validated a machine learning model to predict DM-OP comorbidity using multidimensional dietary assessment.MethodsThis study utilized data from NHANES cycles 2005–2010, 2013–2014, and 2017–2020, ultimately including 4,678 participants aged ≥65 years. Dietary data were collected through 24-h dietary recalls, encompassing macronutrients, micronutrients, food processing classification (NOVA), and five dietary quality scores. Missing data were handled using random forest algorithm, feature selection was performed using Boruta algorithm, and SMOTE technique addressed class imbalance. Eight machine learning algorithms (XGBoost, decision tree, logistic regression, multilayer perceptron, naive Bayes, k-nearest neighbors, random forest, and support vector machine) were implemented with 10-fold cross-validation for performance evaluation.ResultsA total of 4,678 participants were included, with 347 (7.4%) having DM-OP comorbidity (concurrent prediabetes/diabetes and osteoporosis). After feature selection, 46 variables were retained for model construction. The random forest model demonstrated superior predictive performance with the lowest error rate (0.161), highest accuracy (0.839), ROC AUC of 0.965, sensitivity of 0.827, and specificity of 0.852. SHAP analysis revealed gender as the most important predictor, with females at higher risk; BMI showed positive correlation with comorbidity risk; while carotenoid, vitamin E, magnesium, and zinc intake were negatively correlated with disease risk, suggesting potential protective associations. An online risk prediction tool was developed based on the optimized random forest model for real-time individual comorbidity risk calculation.ConclusionThe random forest model demonstrated excellent performance in predicting diabetes-osteoporosis comorbidity in elderly adults, with gender, BMI, and specific nutrient intake as key predictors. This model provides an effective tool for clinical early identification of high-risk populations and implementation of preventive interventions.