openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
634 stars 371 forks source link

Remove old Nutri-Score computation #2957

Closed stephanegigandet closed 4 years ago

stephanegigandet commented 4 years ago

A new NutriScore module was introduced in bug #2427 and we currently compute 2 Nutri-Scores (old algorithm + new algorithm).

There are very few differences in the results:

Data quality Products *
nutriscore-computations-same-grade 322404 *
nutriscore-computations-same-score 321971 *
nutriscore-computations-different-score 603 *
nutriscore-computations-different-grade 170 *

The differences can be explained by a better handling of some very specific threshold values. (e.g. a value of 2.02 for saturated fat should be rounded to 2.0 which is not greater than the 2.0 threshold).

This bug is to replace completely the old computation (currently shown on product page and in the API fields expected by apps) and the new computation (currently computed and shown in the Nutri-Score computation detail).

stephanegigandet commented 4 years ago

Deployed new Nutri-Score and recomputed it for all products.