Hostname: page-component-cd9895bd7-mkpzs Total loading time: 0 Render date: 2024-12-22T12:18:57.946Z Has data issue: false hasContentIssue false

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

Published online by Cambridge University Press:  16 December 2024

N.R Tran
Affiliation:
Institute for Physical Activity and Nutrition (IPAN), School of Exercise and Nutrition Sciences, Deakin University, Geelong, VIC 3220, Australia
Y. Zhang
Affiliation:
Institute for Physical Activity and Nutrition (IPAN), School of Exercise and Nutrition Sciences, Deakin University, Geelong, VIC 3220, Australia
R.M Leech
Affiliation:
Institute for Physical Activity and Nutrition (IPAN), School of Exercise and Nutrition Sciences, Deakin University, Geelong, VIC 3220, Australia
S.A McNaughton
Affiliation:
Health and Well-Being Centre for Research Innovation, School of Human Movement and Nutrition Sciences, University of Queensland, St Lucia, QLD 4067, Australia
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Abstract
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of The Nutrition Society

References

Poobalan, A & Aucott, L (2016) Curr Obes Rep 5, 213.CrossRefGoogle Scholar
Moore, DM, Madrid, I & Lindsay, KL (2023) J Nutr Educ Behav.Google Scholar
Jinnette, R, Narita, A, Manning, B et al (2021) Adv Nutr 12, 657–69.CrossRefGoogle Scholar
Vandeputte, J, Herold, P, Kuslii, M et al (2023) J Nutr 153, 598604.CrossRefGoogle Scholar
Lin, A, Cornely, A, Kalam, F et al (2022) Curr Dev Nutr 6, 417.CrossRefGoogle Scholar
Mousavi, H, Karandish, M, Jamshidnezhad, A et al (2022) Sci Rep 12, 12340.CrossRefGoogle Scholar
Pendergast, FJ, Livingstone, KM, Worsley, A et al (2019) Nutr J 18.CrossRefGoogle Scholar
Pendergast, FJ, Ridgers, ND, Worsley, A et al (2017) Int J Behav Nutr Phys Act 14, 110.CrossRefGoogle Scholar
Anghel, A, Papandreou, N, Parnell, T et al (2018) ArXiv 180904559.Google Scholar
Breiman, L (2001) Mach Learn 45, 532.CrossRefGoogle Scholar
Belle, V & Papantonis, I (2021) Front Big Data 4, 688969.CrossRefGoogle Scholar