Machine learning improves obesity identification
A machine learning model identified patients with obesity in retrospective health data with 79% sensitivity vs 60% for body mass index diagnosis codes alone, according to a study of more than 1.7 million US adults.
The retrospective study, published in Diabetes, Obesity and Metabolism, developed and internally validated models for identifying patients with obesity in research databases.
“These tools could enhance obesity identification in retrospective claims analyses and guide population-level assessment of obesity-related burden, health care utilization, costs, and outcomes,” the authors wrote.
Populations and predictors
Researchers used administrative claims and electronic health record data from the Healthcare Integrated Research Database from January 1, 2022, through September 30, 2024. The database includes patients enrolled in commercial and Medicare Advantage health plans and was enriched with laboratory results and neighborhood-level social drivers of health data from the American Community Survey and Food Access Research Atlas.
Eligible patients were aged 18 years or older, had a valid recorded body mass index (BMI), and had continuous medical and pharmacy coverage for at least 182 days before and after the index date. The index date was the date of the most recent valid BMI measurement between July 1, 2022, and March 31, 2024. Patients with claims indicating pregnancy, bariatric surgery, or limb amputation were excluded.
Of 1,728,010 included patients, 706,992 (41%) had obesity, defined as a BMI of at least 30 kg/m². Median age was 52 years, 59% were female, and 81% had commercial insurance.
Potential predictors included demographics, BMI diagnosis codes, comorbidities, health care utilization and costs, laboratory and clinical measurements, and neighborhood socioeconomic characteristics. Comorbidities, health care utilization and costs, and laboratory measurements were assessed during the 182 days before and after the index date. Demographic and neighborhood socioeconomic characteristics were assessed at index.
Model development
Researchers used Extreme Gradient Boosting, a decision tree–based machine learning method. They randomly reserved 30% of patients for testing and used the remaining 70% for training and validation, including five-fold cross-validation.
The main model, called the collapsed categorical model, was derived from a model that estimated probabilities for four categories: no obesity and class 1, 2, or 3 obesity. Class 1 obesity was defined as a BMI of 30 to less than 35 kg/m²; class 2, 35 to less than 40 kg/m²; and class 3, at least 40 kg/m².
Researchers summed the probabilities for the three obesity classes to produce a single probability of BMI of at least 30 kg/m². A separate binary classification model was trained to distinguish patients with and without obesity directly. Recorded BMI served as the reference standard.
Performance and subgroup findings
The collapsed categorical model achieved an F1 score of 0.797 vs 0.716 for BMI diagnosis codes alone.
At a probability threshold of 0.40, selected to optimize the F1 score, the collapsed categorical model had a sensitivity of 79% vs 60%, specificity of 87% vs 95%, and positive predictive value of 81% vs 89% for BMI diagnosis codes alone. Overall accuracy was 84% vs 81%.
The collapsed categorical model had an area under the precision-recall curve of 0.901 vs 0.839 for the binary classification model. The authors identified the collapsed categorical model as the best-performing approach based on its higher area under the precision-recall curve. Its F1 score was also higher than the binary model’s, at 0.797 vs 0.746.
When distinguishing patients by obesity class, the collapsed categorical model also had higher accuracy than BMI diagnosis codes alone: 77% vs 34%.
Performance was generally consistent across male and female patients and across patients aged 18 to 49, 50 to 64, and 65 years and older. The area under the receiver operating characteristic curve ranged from 0.902 to 0.925 across these subgroups, compared with 0.916 overall. Positive predictive value, accuracy, F1 score, and area under the precision-recall curve were also generally stable. The model was evaluated within these subgroups without retraining.
Diagnosis codes and aggregated diagnosis-code categories accounted for the seven highest-ranked predictors by scaled gain in the main model. Other leading predictors included clinical measurements, obstructive sleep apnea, social drivers of health, and age.
An exploratory model using pharmacy claims and demographic information performed better than obesity medication claims alone but worse than models using integrated claims, clinical, laboratory, and neighborhood data. Its F1 score was 0.621 vs 0.051 for obesity medication claims alone.
A separate model excluded patients with diagnosis-code evidence of obesity from its training population and omitted obesity-related diagnosis codes as predictors. It performed worse than the main models but identified some patients with obesity who lacked those codes.
Study limitations
The authors noted that claims collected for billing may contain coding inconsistencies, missing data, and measurement errors. BMI is a proxy for obesity, and requiring an available BMI measurement may have introduced selection bias. Findings may not generalize to patients with other insurance, patients without insurance, or populations outside the US.
Neighborhood-level social data could misclassify patients’ circumstances, and pandemic-related changes in health care use could have affected the results.
Although researchers reported Brier scores, they did not separately assess calibration using calibration plots, slopes, intercepts, or score decomposition. The study also could not establish the direction of causation between obesity and associated comorbidities or social factors.
Boehringer Ingelheim funded the study, and Carelon Research funded medical writing support. Michael A. Head, Malvika Venkataraman, Chia-Chen Teng, and Hiangkiat Tan reported employment with Carelon Research; Teng also reported being an Elevance Health shareholder. Anindit Chhibber, Effie Kuti, Lattoya Lartey, and Bonnie M. Donato reported employment with Boehringer Ingelheim.
Expert insight
AACE Endocrine AI invited corresponding author Michael A. Head, MS, of Carelon Research in Wilmington, Delaware, to elaborate on the study's findings.
Why does this study matter?
Obesity affects a significant portion of the US population, but traditional claims-based approaches can substantially under-identify people with obesity because they depend largely on whether an obesity diagnosis or related code appears in the medical claim. In our study, BMI diagnosis codes alone identified only about 60% of people known to have obesity. By using machine learning to incorporate a much broader set of available information, including claims, laboratory data, and neighborhood-level social drivers of health, we were able to improve identification of people with obesity. A more complete picture could help health plans and researchers better understand populations, support targeted outreach and education, and conduct more accurate real-world evidence research.
Was there a finding, or perhaps more than one, that surprised you?
What some may find surprising is how much information beyond a traditional diagnosis code can contribute to potentially identifying people with obesity. The model considered approximately 4,000 variables, including laboratory information and neighborhood-level factors, such as socioeconomic measures, education levels, and home values. These factors would not typically be available in a standard closed claims database, but collectively they helped improve the model’s ability to identify people with obesity. This reinforces the value of looking beyond any single data point and bringing together multiple sources of information when trying to understand health at the population level.
How might the findings influence clinical practice?
The most immediate application is probably not at the individual clinical level. A clinician seeing a patient generally has more direct information available to determine whether that individual has obesity and does not need an algorithm like this to make that determination. I believe this approach could be particularly useful at the population-health level. For example, a health plan looking across hundreds of thousands or a million members could use an approach like this to more accurately identify potential populations that may benefit from outreach, education, or nutrition-related programs. It may also strengthen real-world evidence research by helping researchers build more accurate study populations when obesity is an important factor in outcomes or costs.
Is there anything else you'd like to say about this work?
One important point is that this is a promising methodology, but there are limitations and opportunities for additional research. The model was developed and internally validated using our integrated data, which include commercial and Medicare Advantage populations, and it has not yet been externally validated. It therefore would be important to evaluate how well the approach performs in other populations, such as people enrolled in Medicaid. More broadly, the methodology may also have applications beyond obesity. There are other health conditions that are not consistently captured in claims data, and an approach that combines multiple types of information could potentially help researchers identify those populations more accurately as well.
AACE Endocrine AI is published by Conexiant under a license arrangement with the American Association of Clinical Endocrinology, Inc. (AACE®). The ideas and opinions expressed in AACE Endocrine AI do not necessarily reflect those of Conexiant or AACE. For more information, see Policies.