Exploring approaches to computational representation and classification of user-generated meal logs
- 14 March 2026
- journal article
- Published by Oxford University Press (OUP) in Journal of the American Medical Informatics Association
- Vol. 33 (4) , 836-846
Abstract
Objective: This study examined the use of machine learning (ML) and domain-specific enrichment in patient-generated health data, in the form of free-text meal logs, to classify meals on alignment with different nutritional goals. Materials and Methods: We used a dataset of over 3000 meal records collected by 114 individuals from a diverse, low-income community in a major US city using a mobile app. Registered dietitians (RDs) provided expert judgment for meal-goal alignment, used as the “gold-standard” for evaluation. Using text embeddings (TF-IDF and BERT) and domain-specific enrichment information (ontologies, ingredient parsers, and macronutrient contents) as inputs, we evaluated the performance of logistic regression and multilayer perceptron classifiers using accuracy, precision, recall, and F1 score against the gold standard and the individual’s self-assessment. Results: On average, individuals who logged meals achieved 0.576 accuracy of meal-goal alignment self-assessments. Even without enrichment, ML outperformed individual’s self-assessments, with accuracies within 0.726-0.841 for different goals. The best-performing combination of ML classifier with enrichment achieved even higher accuracies (0.814-0.902). In general, ML classifiers with enrichment of parsed ingredients, food entities, and macronutrients information performed well across multiple nutritional goals, but there was variability in the impact of enrichment and classification algorithm on accuracy of classification for different nutritional goals. Conclusion: ML can utilize unstructured free-text meal logs and reliably classify whether meals align with specific nutritional goals, exceeding individuals’ self-assessments, especially when incorporating nutrition domain knowledge. Our findings highlight the potential of ML analysis of patient-generated health data to support patient-centered nutrition guidance in precision healthcare.Keywords
All Related Versions
Funding Information
- National Science Foundation (2306690)
- National Institute of Diabetes and Digestive and Kidney Diseases (R01DK113189)
- U.S. National Library of Medicine (T15LM007079)
- Eusko Jaurlaritza
This publication has 38 references indexed in Scilit:
- Unleashing the Potential for Patient-Generated Health Data (PGHD)Journal of General Internal Medicine, 2024
- Integrating Patient-Generated Health Data Throughout the Total Product Life Cycle of Medical DevicesTherapeutic Innovation & Regulatory Science, 2023
- Natural language processing and machine learning approaches for food categorization and nutrition quality prediction compared with traditional methodsThe American Journal of Clinical Nutrition, 2022
- Improving blood glucose level predictability using machine learningDiabetes/Metabolism Research and Reviews, 2020
- What you use, not what you do: Automatic classification and similarity detection of recipesData & Knowledge Engineering, 2018
- Detecting depression and mental illness on social media: an integrative reviewCurrent Opinion in Behavioral Sciences, 2017
- Dietary Assessment Methodology2017
- Personalized Nutrition by Prediction of Glycemic ResponsesCell, 2015
- Applied Logistic Regression2013
- Literacy, Numeracy, and Portion-Size Estimation SkillsAmerican Journal of Preventive Medicine, 2009