Predicting diet quality and food consumption using contextual factors: an application of machine learning models

Poor diet quality among young adults contributes to increased rates of overweight and obesity (1) . Improving diet quality requires small and achievable changes in eating behaviours (2) . Personalised nutrition interventions offer a promising strategy to modify behaviour and subsequently enhance diet quality but require input data on individuals past behaviour and their environmental contexts to ensure advice is relevant and effective (3) . Machine learning (ML) is a useful tool for predicting behaviours, but few studies have explored the integration of ML capabilities into precision nutrition applications (4–6) . Therefore, this study used ML to investigate whether contextual factors occurring at eating occasions (EO) predict food consumption and, consequently, overall daily diet quality. Analyses were conducted on cross-sectional data from the Measuring Eating in Everyday Life Study (MEALS) (7–8) . Participants (aged 18-30 years, n = 675) recorded dietary intakes at EO (i.e. meals and snacks) in near-real time (3-4 non-consecutive days) using a Smartphone food diary app. Contextual factors for each EO were recorded via the app and categorised as socialenvironmental factors (e.g. activity, persons present while eating) and physical-environmental factors (e.g. consumption location, purchase location). Person level factors describing participant characteristics were collected during an online survey. Intake (servings per EO) of vegetables, fruits, grains, meat, dairy, and discretionary foods were estimated, as per Australian Dietary Guidelines. Gradient boost decision tree (9) and random forest models (10) were chosen a priori ; decision tree provide explainable ML, while random forest improves accuracy (11) . Their performance was evaluated using 10-fold cross-validation, comparing mean absolute error (MAE), root mean square error (RMSE), and R squared. Feature importance analysis was performed to understand important variables for predicting food consumption. All analysis was performed using R. Results indicate that ML can predict most food groups at EO using contextual factors, with an acceptable range in differences between actual consumption and predicted consumption (<1 serving per EO). For instance, MEA values for fruits, dairy, and meat were 0.35, 0.34, and 0.56 servings, respectively. This suggests that, on average, models’ predictions are off by 0.35 servings of fruits per EO using contextual factors (RMSE values for fruit, dairy, and meat were 0.61, 0.50, and 0.80 servings, respectively). Notably, when investigating the influences of different contextual factors on models’ predictions, feature importance analysis indicated that person level factors such as self-efficacy and age were considered highly important, while person presence and purchase locations ranked highly in importance within eating occasion-level factors across most food groups. ML can offer valuable insights into the interplay between contextual factors and food consumption. Future research should investigate which contextual factors, when modified, lead to favourable dietary behaviours, and incorporate these findings into precision nutrition interventions.

Authors

Institutions

Publication Details

Journal
Proceedings of The Nutrition Society
Published
2024-11-01
DOI
https://doi.org/10.1017/s0029665124005767
Primary Topic
Nutritional Studies and Diet
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Predicting diet quality and food consumption using contextual factors: an application of machine learning models

Sarah A. McNaughton, Nguyen Toan Tran, Rebecca M. Leech, Yujie Zhang
Proceedings of The Nutrition Society
Nutritional Studies and Diet
article

Predicting diet quality and food consumption using contextual factors: an application of machine learning models

Sarah A. McNaughton, Nguyen Toan Tran, Rebecca M. Leech, Yujie Zhang
article en

Abstract

Poor diet quality among young adults contributes to increased rates of overweight and obesity (1) . Improving diet quality requires small and achievable changes in eating behaviours (2) . Personalised nutrition interventions offer a promising strategy to modify behaviour and subsequently enhance diet quality but require input data on individuals past behaviour and their environmental contexts to ensure advice is relevant and effective (3) . Machine learning (ML) is a useful tool for predicting behaviours, but few studies have explored the integration of ML capabilities into precision nutrition applications (4–6) . Therefore, this study used ML to investigate whether contextual factors occurring at eating occasions (EO) predict food consumption and, consequently, overall daily diet quality. Analyses were conducted on cross-sectional data from the Measuring Eating in Everyday Life Study (MEALS) (7–8) . Participants (aged 18-30 years, n = 675) recorded dietary intakes at EO (i.e. meals and snacks) in near-real time (3-4 non-consecutive days) using a Smartphone food diary app. Contextual factors for each EO were recorded via the app and categorised as socialenvironmental factors (e.g. activity, persons present while eating) and physical-environmental factors (e.g. consumption location, purchase location). Person level factors describing participant characteristics were collected during an online survey. Intake (servings per EO) of vegetables, fruits, grains, meat, dairy, and discretionary foods were estimated, as per Australian Dietary Guidelines. Gradient boost decision tree (9) and random forest models (10) were chosen a priori ; decision tree provide explainable ML, while random forest improves accuracy (11) . Their performance was evaluated using 10-fold cross-validation, comparing mean absolute error (MAE), root mean square error (RMSE), and R squared. Feature importance analysis was performed to understand important variables for predicting food consumption. All analysis was performed using R. Results indicate that ML can predict most food groups at EO using contextual factors, with an acceptable range in differences between actual consumption and predicted consumption (<1 serving per EO). For instance, MEA values for fruits, dairy, and meat were 0.35, 0.34, and 0.56 servings, respectively. This suggests that, on average, models’ predictions are off by 0.35 servings of fruits per EO using contextual factors (RMSE values for fruit, dairy, and meat were 0.61, 0.50, and 0.80 servings, respectively). Notably, when investigating the influences of different contextual factors on models’ predictions, feature importance analysis indicated that person level factors such as self-efficacy and age were considered highly important, while person presence and purchase locations ranked highly in importance within eating occasion-level factors across most food groups. ML can offer valuable insights into the interplay between contextual factors and food consumption. Future research should investigate which contextual factors, when modified, lead to favourable dietary behaviours, and incorporate these findings into precision nutrition interventions.

Proceedings of The Nutrition SocietyVol. 83(OCE4)
Deakin University (AU), The University of Queensland (AU)
Zero hunger
Openalex Percentile: Top 64%
Nutritional Studies and Diet
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.