Difference between revisions of "Recipe/Estimation"

From Open Food Facts wiki
Jump to navigation Jump to search
Line 91: Line 91:
  
 
=== Formal representation ===
 
=== Formal representation ===
If we have a product with N ingredients and want to calculate M nutrients, we get the formula:
+
If we have a product with N ingredients and want to calculate one of the nutrients of the product from the ingredients, we get the formula:
  weight_nutrient<sub>i</sub> = <big><big><big>Σ</big></big></big><sub><sub>j=0</sub></sub><sup><sup>N-1</sup></sup> nutrient<sub>ij</sub>weight_ingredient<sub>j</sub>
+
  weight_nutrient<sub>i</sub> = <big><big><big>Σ</big></big></big><sub><sub>j=0</sub></sub><sup><sup><sup>N-1</sup></sup></sup> nutrient_fraction<sub>ij</sub> weight_ingredient<sub>j</sub>
 +
 
 +
in this formula we have
 +
* weight_nutrient<sub>i</sub> - the weight of nutrient i;
 +
* nutrient_fraction<sub>ij</sub> - the fraction of nutrient i for ingredient j;
 +
* weight_ingredient<sub>j</sub> - the weight of ingredient j;
  
 
=== Estimating ===
 
=== Estimating ===

Revision as of 14:01, 20 January 2025

The idea behind recipe estimation is that is possible to determine the recipe of a product based on the ingredients and nutritional values. It is based on the assumption that the amount of nutrients do not change during product creation process.

Exploration

To illustrate the recipe estimation idea several examples will be explored by looking at some products.

Apple syrup

Apple syrup is a product where apples are cooked, the water evaporates and one is left with a very thick syrup. An example is this product. This product contains 67% of nutrients. As the product weight is 450 gram there are some 300 gram of nutrients.

How many apples are required before one has 300 gram of nutrients? We have no idea what kind of apples have been used, so we need to make an assumption for the apple variety. The Ciqual database has an entry for Apple, pulp, raw, which contains 13.3% nutrients, or 13.3 gram per 100 gram of raw apple pulp. This implies that 22.6 times as much apples must have been used, i.e. 2260 gram of raw apple pulp, more than 2 kilogram of apple pulp.

If one looks at specific apple varieties in the Ciqual database the nutrient fraction varies from 12-16%, so not much spread.

The Apple syrup product states that 7 kg of apples were used to create 450 grams of syrup. This implies 1.6 kg of apples for 100 g of syrup. A bit less than our example, implying that a more sugary apple variety has been used for this syrup. Also because the package probably indicates the amount of raw unpeeled, unprepared apples.

Tomato puree

The Ciqual database has an entry for Tomato puree, canned, which as 14.4% nutrients. Tomato puree is a single ingredient product: only tomatoes have been used. The Ciqual entry for Tomato, raw has 5.9% nutrients.

Using 100 gram of tomato puree, we have 14.4 gram of nutrients, which implies that 244 gram of Ciqual tomatoes must have been used.

Instead of using the total nutrients we could also use a more specific nutrient, like sugar. Sugar is the dominant nutrient in the Ciqual tomatoes (2.48%) and determines the carbohydrates (2.49%). This is not the case with the Ciqual tomato puree, which has 7.54% carbohydrates and 3.64% sugars. Basing the calculation on the carbohydrates we would have used 300 gram of tomatoes, but based on the sugars 141 gram of tomatoes.

Clearly no Ciqual tomatoes were used in Ciqual tomato puree.

Natural potato crisps

Potato crisps only have three ingredients: potatoes, oil (used to baked the potatoes in) and salt (added for taste. As the potatoes hardly contain fat and salt, the oil does not contain carbohydrates or salt, the determination of the recipe is very straightforward.

The Ciqual category for Potato, crisps, plain or flavoured has 51.1% carbohydrates, 34.4% fat, and 1.65% salt. The Ciqual category for New potato, raw has 15.9% carbohydrates.

With this we can derive the recipe for 100 gram Natural potato crisps:

  1. Potatoes (new, raw): 321 gram
  2. Sunflower oil: 34.4 gram
  3. Salt:1.65 gram

Mozzarella

In this example the Mozzarella from cow's milk category will be explored. In Ciqual this is indicated by Mozzarella cheese, from cow's milk. The Ciqual nutrients for this product are:

Caption text
Nutrient Percentage Required
Fat 17.7 354
Saturated fat 11.7
Carbohydrates 0.75
Sugars 0.7 19
Fibre 0
Proteins 16.5 500
Salt 0.6
Water 62.7

The ingredients for Mozzarella are basically milk, an enzyme and salt. The amount of enzyme is (probably) very small and does not have to be taken into account for the nutrients. The salt only comes from the added salt, so all nutrients must be explained from the milk.

If we use the Ciqual Milk, whole, pasteurised category we will use milk with 3.3% fat and 3.3% proteins. No sugars are listed, but Lactose is (3.2%), which is a kind of sugar.

With this we can calculate the amount of milk needed to explain the nutrients in Mozzarella. This is presented in the last column of the table. The values for fat and proteins are roughly similar: 300 - 500 grams of milk are required to have 100 gram of Mozzarella.

But the value for sugars is way off. This is because the sugars that went in are fermented and are no longer in the end product.

Apricot jams

The examples so far are very simple ones, in the sense that a single ingredient is responsible for a single nutrient. Most products are much more complicated and multiple ingredients will contribute to multiple nutrients.

A simple example of such a product category is Apricot Jams. The most important ingredients are Apricots and Sugar. This means that not all sugar in an apricot jam comes from the apricots, but also from the added sugar.

These products often indicate the amount of fruit that has been used. In this product this is 65%. This product contains 42% sugars and 1.8% fibre.

The Ciqual nutrients for apricots are 13.3% sugar and 1.4% fibre. The fibre implies that we need 138 gram of Ciqual apricots to explain the fiber. This amount of apricots would explain 18.3 gram of sugar in the apricot jam. The rest of the sugar (23.7 gram) in the jam, must come from one of the added sugars (sucre de canne or pectine de fruits). As fruit pectine is not defined in Ciqual, nor is Cane sugar, so cane use either brown or white sugar as a replacement. As brown sugar has 95.5% sugar, we would need 24.8 gram of sugar to account for the sugar in this apricot jam.

Observations

Ingredient stand-ins

The various examples in the exploration part show that the ingredients do not necessarily have the same nutrients that were actually used for the product. The ingredients are only stand-ins (proxies) for the calculation. Any recipe should be interpreted in terms of ingredients used and not those that found on the packaging.

The question is what ingredient data should be used as starting point (Ciqual, OFF, FDA, ...).

Key ingredients

Not all ingredients play a determining role in the nutrients. Thus ingredients like flavours, additives, etc do not have to be taken into account.

Assumption violation

The assumption that the nutrients of the ingredients should be the same as the nutrients in the processed product, is not always true. For these categories not all nutrients can be used in the calculation. This is the case for:

  • Fermented products where the sugars have been transformed into acids (yoghurts, cheeses, beers)

Nutrient uncertainty

We do not know the exact nutrients that went into a product. This might mean that different nutrients imply different quantities. So what to use?

Formalisation

The discussion in the exploration paragraph shows the principles of the recipe calculation. For single ingredient products we use the ratio of the nutrient_fractionproduct / nutrient_fractioningredient to get the weight of the ingredient. These needs to extended to all ingredients and all nutrients.

Formal representation

If we have a product with N ingredients and want to calculate one of the nutrients of the product from the ingredients, we get the formula:

weight_nutrienti = Σj=0N-1 nutrient_fractionij weight_ingredientj

in this formula we have

  • weight_nutrienti - the weight of nutrient i;
  • nutrient_fractionij - the fraction of nutrient i for ingredient j;
  • weight_ingredientj - the weight of ingredient j;

Estimating

Statistical approach