Information Technology Reference
In-Depth Information
Fig. 16.6 Calculating ingredient proportions
formulation, the inputs to which are provided by the new recipe requirements, the
corpus of recipes, and nutritional and ingredient type information from the knowl-
edge database. Figure 16.6 shows the various inputs described above as well as their
sources, depicting how they feed into the optimization module. The optimization
attempts to balance the nutrient and ingredient type composition of the target recipe.
Let us first consider the nutrient composition of the new recipe. Since there are
M ingredients in the new recipe and the m th ingredient has proportion c mp of the p th
nutrient, the total amount of the p th nutrient in the new recipe can be obtained by
summing over all ingredients: m = 1 x m c mp . We propose the following cost function
for nutrient balancing:
2
1
M
P
nutrient
p
p = 1 ˃
˃
1
C nutrient
nutrient
p
=
x m c mp μ
P
1
nutrient
p
p
=
1
m
=
1
When this nutrient balancing cost is minimized, proportions where the nutrient
composition in the new recipe deviates from the mean nutrient composition are
penalized. The weight/importance of any particular nutrient is inversely proportional
to its standard deviation. The rationale behind this approach is that the composition
of the new dish should conform more closely to existing dishes for those aspects
that exhibit little variation in the database (and are therefore considered more tightly
constrained from a structural formula point of view).
In a similar vein, we use the following cost function to conform to the distribution
of ingredient types in the existing recipes:
2
Q
ing type
q
q = 1 ˃
M
1
˃
C ing type
1
ing type
q
=
x m t mq μ
ing type
q
Q
1
q
=
1
m
=
1
Search WWH ::




Custom Search