Abstract Background Improving diet quality relies on making manageable adjustments to eating behaviours. Personalised nutrition interventions hold promise for modifying behaviour. Machine learning (ML) offers a novel approach to examining dietary behaviours in personalised nutrition by leveraging data on past behaviours and environmental contexts. This study aims to investigate whether contextual factors at eating occasions (EO) can predict food consumption to enhance diet quality. Methods Cross sectional data from the Measuring Eating in Everyday Life Study (MEALS) were analysed (n = 675, 18-35y). A smartphone food diary app recorded dietary intakes at EO for 3-4 non-consecutive days, also capturing social-environmental (e.g., activity) and physical-environmental factors (e.g., consumption location). Participant characteristics were collected via an online survey. Food groups intake (servings per EO) followed Australian Dietary Guidelines. This study benchmarked two established models, gradient boost decision tree and random forest, which have previously shown high performance in similar tasks. Performance was evaluated using 10-fold cross-validation, measuring mean absolute error (MEA), root mean square error (RMSE), and R squared. Feature importance analysis identified key variables for predicting food consumption. Results ML predicts most food groups at EO using contextual factors, with slight differences between actual and predicted consumption (<1 serving per EO). For fruits, dairy, and meat, MEA values were 0.35, 0.34, and 0.56 servings, respectively (RMSE values: 0.61, 0.50, and 0.80 servings). Self-efficacy, age and consumption location were influential in most ML models. Conclusions ML offers insights into contextual factors and food consumption, suggesting directions for precision nutrition interventions. Future research should identify positive influences of contextual factors on dietary behaviours and incorporate these insights into interventions. Key messages • Machine learning can effectively predict food consumption based on contextual factors at eating occasions. • Understanding the influence of contextual factors such as consumption location on food consumption can inform the development of precision nutrition interventions aimed at improving diet quality.
Read full abstract