A Machine Learning Approach to Predict the Added-Sugar Content of Packaged Foods
Tazman Davies1, Jimmy Chun Yu Louie1,2, Rhoda Ndanuko1
1The George Institute for Global Health, Faculty of Medicine, University of New South Wales, Sydney, New South Wales, Australia.
Background:
Dietary guidelines recommend limiting the intake of added sugars. However, despite the public health importance, most countries have not mandated the labeling of added-sugar content on packaged foods and beverages, making it difficult for consumers to avoid products with added sugar, and limiting the ability of policymakers to identify priority products for intervention.
Objective:
The aim was to develop a machine learning approach for the prediction of added-sugar content in packaged products using available nutrient, ingredient, and food category information.
Methods:
The added-sugar prediction algorithm was developed using k-nearest neighbors (KNN) and packaged food information from the US Label Insight dataset (n = 70,522). A synthetic dataset of Australian packaged products (n = 500) was used to assess validity and generalization. Performance metrics included the coefficient of determination (R2), mean absolute error (MAE), and Spearman rank correlation (ρ). To benchmark the KNN approach, the KNN approach was compared with an existing added-sugar prediction approach that relies on a series of manual steps.
Results:
Compared with the existing added-sugar prediction approach, the KNN approach was similarly apt at explaining variation in added-sugar content (R2 = 0.96 vs. 0.97, respectively) and ranking products from highest to lowest in added-sugar content (ρ = 0.91 vs. 0.93, respectively), while less apt at minimizing absolute deviations between predicted and true values (MAE = 1.68 g vs. 1.26 g per 100 g or 100 mL, respectively).
Conclusions:
KNN can be used to predict added-sugar content in packaged products with a high degree of validity. Being automated, KNN can easily be applied to large datasets. Such predicted added-sugar levels can be used to monitor the food supply and inform interventions aimed at reducing added-sugar intake.
Related Concept Videos
Predicting Products: Substitution vs. Elimination
The following factors can influence the mechanisms competing against each other:
Sugars as Energy Storage Molecules
Predicting Products: SN1 vs. SN2
With increased substitution on the alkyl halide,...
Predicting Reaction Outcomes


