ORIGINAL RESEARCH article
Front. Public Health
Sec. Public Health and Nutrition
Volume 13 - 2025 | doi: 10.3389/fpubh.2025.1606751
A Machine Lear ning Model for Pr edicting Obesity Risk in Patients with Diabetes Mellitus: Analysis of NHANES 2007-2018
Provisionally accepted- 1Department of Plastic and Reconstructive Surgery, The People’s Hospital of Guangxi Zhuang Autonomous Region & Research Center of Medical Sciences, Guangxi Academy of Medical Sciences, Nanning, Guangxi, China
- 2Department of Bone and Joint Surgery, (Guangxi Diabetic Foot Salvage Engineering Research Center), The First Affiliated Hospital of Guangxi Medical University, Nanning 530021, Guangxi, China
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Background: Obesity is a prevalent and clinically significant complication among individuals with diabetes mellitus (DM), contributing to increased cardiovascular risk, metabolic burden, and reduced quality of life. Despite its high prevalence, the risk factors for obesity within this population remain incompletely understood. With the growing availability of large-scale health datasets and advancements in machine learning, there is an opportunity to improve risk stratification. This study aimed to identify key predictors of obesity and develop a machine learning-based predictive model for patients with T2DM using data from the National Health and Nutrition Examination Survey (NHANES). Methods: Data from adults with diabetes were extracted from the NHANES 2007-2018 cycles. Participants were categorized into obese and non-obese groups based on BMI. Least absolute shrinkage and selection operator (LASSO) regression with 10-fold cross-validation was used to select relevant features. Subsequently, nine machine learning algorithms-including logistic regression, random forest (RF), radial support vector machine (RSVM), k-nearest neighbors (KNN), XGBoost, LightGBM, decision tree (DT), elastic net regression (ENet), and multilayer perceptron (MLP)-were employed to construct predictive models. Model performance was evaluated based on area under the ROC curve (AUC), calibration curves, Brier score, and decision curve analysis (DCA). The best-performing model was visualized using a nomogram to enhance clinical applicability. Results: A total of 3,794 participants with type 2 diabetes were included in the analysis, of whom 57.0% were classified as obese. LASSO regression identified 19 key variables associated with obesity. Among the nine machine learning models evaluated, the logistic regression model demonstrated the best overall performance, with the lowest Brier score. It also showed good discrimination (AUC = 0.751 in the training set and 0.781 in the test set), favorable calibration, and consistent clinical utility based on decision curve analysis (DCA). A nomogram was constructed based on the logistic regression model to facilitate individualized risk prediction, with total points corresponding to predicted probabilities of obesity. Conclusion: Obesity remains highly prevalent among individuals with type 2 diabetes. Our findings highlight key clinical features associated with obesity risk and provide a practical tool to aid in early identification and individualized management of high-risk patients.
Keywords: Diabetes Mellitus, Obesity, machine learning, NHANES, LASSO regression, Predictive Modeling, nomogram
Received: 06 Apr 2025; Accepted: 05 Aug 2025.
Copyright: © 2025 Yang, Mo, Chen and Wang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
* Correspondence:
Sijie Yang, Department of Plastic and Reconstructive Surgery, The People’s Hospital of Guangxi Zhuang Autonomous Region & Research Center of Medical Sciences, Guangxi Academy of Medical Sciences, Nanning, Guangxi, China
Wenqiang Wang, Department of Bone and Joint Surgery, (Guangxi Diabetic Foot Salvage Engineering Research Center), The First Affiliated Hospital of Guangxi Medical University, Nanning 530021, Guangxi, China
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.