Real-World Identification of Obesity: Development and Internal Validation of a Machine Learning Algorithm.
Journal:
Diabetes, obesity & metabolism
Published Date:
Oct 25, 2026
Abstract
AIMS: To develop and internally validate machine learning (ML) models to retrospectively identify people with obesity (PwO) (body mass index [BMI] ≥ 30 kg/m2) using administrative claims and electronic health record (EHR) data. MATERIALS AND METHODS: This study used US commercial and Medicare Advantage claims and EHR data from the Healthcare Integrated Research Database (HIRD) enriched with clinical, laboratory and social drivers of health data from the American Community Survey and Food Access Research Atlas between 1 January 2022 and 30 September 2024. Potential predictor features were defined and calculated for the study population. Several models were created with a decision tree-based ML method, Extreme Gradient Boosting (XGBoost). A random selection of 30% of individuals and their observed BMIs were used for testing; the remaining 70% were utilized for training and validation. Performance metrics included area under the precision-recall curve, F1 score, sensitivity, specificity, positive predictive value (PPV) and accuracy. F1 score, which balances sensitivity and PPV, was used to compare ML models to a confusion matrix using BMI diagnosis codes alone. RESULTS: Among 1 728 010 included individuals, 706 992 (40.9%) were PwO (Class 1, 371 843 [21.5%]; Class 2, 187 857 [10.9%]; Class 3, 147 292 [8.5%]). The collapsed categorical model (F1 score, 0.797) performed better than a confusion matrix using BMI diagnosis codes alone (F1 score, 0.716). CONCLUSIONS: The ML model successfully identified PwO and outperformed a confusion matrix approach using BMI diagnostic codes alone, showing potential to enhance retrospective obesity identification and guide population-level assessment of obesity-related burden, healthcare utilization, costs and outcomes.
Authors
Keywords
No keywords available for this article.