Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add max constraints on some high sugar/salt/fat ingredients #85

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stephanegigandet
Copy link
Contributor

adding constraints on the maximum of specific ingredients that have known absolute minimums for specific nutrients like sugar, salt, fat

getting better results:

baseline: 23.39 average difference
salt < 5: 23.28

  • en:flavouring < 1: 23.29
  • additives < 1g: 22.92
  • max limit on sugars and salt (individual ingredient limit): 22.76
  • en:cane-sugar: 22.71
    better function for max salt, sugars (limit on combined content of ingredients contributing sugar): 22.69
  • oils: 22.66
  • butter: 22.64
  • btterfat: 22.64
  • cocoa butter: 22.63

approach can be generalized for all ingredients:

  • the sum of the absolute minimums of sugars/salt/fat of all ingredients must be inferior to the total nutrient value
  • the sum of the absolute maximums of sugars/salt/fat of all ingredients must be greater to the total nutrient value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant