<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Proposed General Formula to Create and Analyze Baking Recipes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michael Ohene</string-name>
          <email>michael@easierbaking.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>EasierBaking</institution>
          ,
          <addr-line>1301 St. John Street, Apt. 206, Lafayette, LA 70506</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <fpage>245</fpage>
      <lpage>252</lpage>
      <abstract>
        <p>A mathematical formula for characterizing baking recipes is presented as part of the 2017 Computer Cooking Contest Open Challenge. The formula produces three characteristic values, which along with common knowledge rules and classi cation, form the basis of two computer applications: Random Recipe Generator, which creates recipes, and Recipe Report Card, which analyzes recipes.</p>
      </abstract>
      <kwd-group>
        <kwd>recipe analysis</kwd>
        <kwd>recipe creation</kwd>
        <kwd>recipe classi cation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The mystery of baking recipes has existed for many years despite many attempts
to discover a formula or set of rules to describe them [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The discovery of
a universal formula or set of rules would, at least, form a basis for answering
key questions governing baking. Of particular interests are the abilities to create
custom recipes and to discover new uses for ingredients in baking. In lieu of a
universal formula, creating new recipes by adaptation remains popular, however,
this approach results in recipes limited by their reference recipe.
      </p>
      <p>
        Adaptation has been formalized in research communities, where it involves
creating new recipes by the introduction of substitute ingredients [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], primarily in
a like-for-like relationship, and adaptation rules. The methods for substituting
ingredients have involved evaluating the validity of substitutions by a scoring
procedure [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and by ingredient generalization through a cooking ontology [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        This paper outlines an extended, generalized substitution process where any
ingredient is a candidate for substitution. The only restrictions are common
knowledge rules placed on baked good recipes (e.g., "Cobbler must not contain
water", "Pie crust must contain water"). To avoid the tedious work alluded to
in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the scope of this procedure shall be limited to baked goods.
1.1
A baking recipe provides a list of ingredients and measurements, which includes
instructions for combining the ingredients. Each ingredient may be considered
Copyright © 2017 for this paper by its authors. Copying permitted for private and
academic purpose. In Proceedings of the ICCBR 2017 Workshops. Trondheim, Norway
      </p>
      <p>
        Michael Ohene
either a wet ingredient, a dry ingredient, or semi-wet ingredient. In the following
procedure, rst detailed in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], wet and semi-wet ingredients are given constant
values (see Table 1), while avorings, leavenings (e.g., baking powder, baking
soda, yeast, etc.), seasonings (e.g., salt), and food pieces (e.g., shredded coconut,
walnut pieces, sesame seeds, etc.) are ignored. The constant values are multiplied
by their respective measurements (usually in cups) to yield a numerical product.
The products are summed and nally divided by the dry ingredient product(s),
obtained from values in Table 1, to yield solutions called the moistness, fat, and
egg value [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. These characteristic values (i.e., the moistness value, the fat value,
and the egg value) complete the characterization of baked good recipes.
      </p>
      <p>Ingredients</p>
      <p>Value per Cup
1
6 = 0:27</p>
      <p>Equation (1) shows the wet-over-dry ingredient equation used to calculate
the moistness value from Mary's Sugar Cookie recipe in Table 2. A similar
equation is used to calculate the fat value in equation (2), only using ingredients
that are considered fats. The egg value requires a
number-of-eggs-per-cup-ofdry-ingredients calculation shown in equation (3).</p>
      <p>
        16T bsp
de nes baked goods through the use of characteristic values, where i is the
ingredient constant, q is the quantity, and n is the nth ingredient. The term y; y
refers to the numerical range in moistness, fat, or egg value of a baked good.
y represents the lower limit and y represents the upper limit of the numerical
range.
To accurately de ne the numerical ranges corresponding to baked goods, the
acceptability of recipes and recipe reviews were considered. Instead of analyzing
the reliability of users as in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the sheer number of reviews and the
selection of recipe-focused review sites - as opposed to blogger-focused review sites
served to minimize unreliable reviews. The recipe review ratings and the "make
it again" ratings served to de ne "acceptability". From this point the acceptable
linear equations were constructed from equation (4) to determine the unknown
constants.
      </p>
      <p>From the collection of recipes, acceptable recipes tended fall within the
prede ned numerical ranges, thereby satisfying equation (4). Unacceptable recipes
tended to fall outside the prede ned numerical ranges of the baked goods.
Example deviations from these generalized numerical ranges for cakes are presented
in bold text in Table 3. By generalized, it is meant that the numerical range used
for cakes in Table 3 are aggregations of several independent numerical ranges
representing a variety of cakes (e.g., the egg value for pound cake only occupies
a portion of the 1.00-3.50 egg range).</p>
      <p>Michael Ohene
Recipes
Cakes</p>
      <p>Characteristic Values
Moistness Fat Egg
0.68-1.15
5
2</p>
    </sec>
    <sec id="sec-2">
      <title>Random Recipe Generator</title>
      <p>Random Recipe Generator uses characteristic values to provide users with unique,
randomly generated recipes. The program simply converts characteristics values
to recipes.</p>
      <p>
        The Random Recipe Generator functions using a clickable photo grid of baked
goods and two pull-down menus. The two pull-down menus allow users to choose
their "Fat Level" and "Sweetness", by choosing between "Low Fat", "Regular
Fat", or "High Fat" and "Not too Sweet", "Sweet", or "Really Sweet",
respectively [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
2.1
      </p>
      <p>Choosing Characteristic Values
The steps for choosing a random recipe are as follows:
1) A click by the user selects the numerical ranges that de ne a baked good.
2) From the user's choice for fat level, the numerical range for fat, x2, is chosen.
3) Once the numerical range for fat, x2 = [x2; x2], is chosen, a random fat value,
x2, is chosen and the other two values, the moistness value, x1, and the egg
value, x3, are chosen according to the value x2. Speci cally,</p>
      <p>a second value, x3, in the numerical range for eggs, x3 = [x3; x3], is randomly
chosen, which in turn automatically sets the third value, x1
or</p>
      <p>a second value, x3, in the numerical range for eggs, x3 = [x3; x3], is randomly
chosen, then a constant value is chosen such that a third value, x1, lies within
[x1; x1].
2.2</p>
      <p>Converting the Characteristic Values into a Recipe
After the process of choosing characteristic values based on the user input occurs,
a base ingredient, i.e., an initial guess, is chosen, and the remaining ingredients
are then substituted into equation (4). The possible measurements for the
ingredients are de ned by values in the Random Recipe Generator's database. In
addition to measurement limits, the database also contains prede ned,
ingredient combinations. When equation (4)'s variables are replaced by quantities
and ingredient constants, there exists some distance/error between the original
random recipe's characteristic value vector, x, and the substitution attempt's
(adaptation's) characteristic value vector, si, which can be calculated as the
Euclidean distance, equation (5).</p>
      <p>d(x; si) =
q
(x1
si;1)2 + (x2
si;2)2 + (x3
si;3)2:
(5)
There are 1410 iterations, i, of the ingredient substitution process, producing
the distance values d(x; s1); :::; d(x; s1410). The ingredient substitution attempt
(adaptation) with the shortest distance, arg min d(x; si), is selected and
presented to the user.</p>
      <p>Michael Ohene</p>
      <p>Discovering New Ingredient Uses
Case-based reasoning di ers from Random Recipe Generator's procedure, but it
would be erroneous to say the current procedure did not utilize a case base. In
fact, Random Recipe Generator relies upon a numerical abstraction of the recipe
case base mentioned in the Knowledge Acquisition section. This abstraction
helps to eliminate the detailed knowledge usually required to create recipes and
completely eliminates the need for recipe retrieval.</p>
      <p>
        In addition, instead of a more detailed formal concept analysis (FCA)
approach described in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], the only additional information needed to create a recipe
is a generalized classi cation structure (e.g., whether an ingredient is a nut, egg,
dairy, dry ingredient, chocolate, etc.). In other words, any ingredient can be
added to the Random Recipe Generator database and incorporated into recipes
as long as its classi cation and ingredient constant are known. As an
example, Table 4 shows three recipes for chocolate chip cookies using peanut butter,
ground almonds, and all-purpose wheat our.
      </p>
      <p>Ingredients</p>
      <p>Low Fat
Not Too Sweet Sweet</p>
      <p>Really Sweet
A logical extension of the work in Table 4 is the development of a recipe analysis
tool. In this role, Recipe Report Card serves to create an alternative to the
traditional recipe review, i.e., to provide accurate, objective feedback for baking
recipes. The use of the Recipe Report Card creates baking recipes which can be
customized and prescreened. In addition, if the recipe's characteristic values fall
within a prede ned numerical range and satisfy common knowledge rules (e.g.,
"Brownie must contain chocolate"), the recipe is labeled and feedback about the
7
recipe's sweetness and avor is provided to the user. The prede ned numerical
ranges are approximated in Table 5.
4</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion and Future Work</title>
      <p>A proposed mathematical formula for baking recipes was shown capable of
identifying unacceptable recipes. The results also produced logical mathematical
groupings of baked good recipes. Through the Random Recipe Generator, it
was shown that it is possible to generate di erent recipes from characteristic
values via ingredient constants.</p>
      <p>The next task for both the Recipe Report Card and the Random Recipe
Generator is to produce structured lists of baking recipes. Other areas of investigation
include the discovery of additional ingredient constants and the continued
development of the current mathematical formula to address dairy-based desserts
(e.g., ice cream, cheesecake, and custards).</p>
      <p>Michael Ohene</p>
      <p>Fat Values
0.00-0.05 0.05-0.10 0.10-0.20 0.20-0.34</p>
      <p>Egg Values
0-0.5 0.5-1.0 0-0.5 0.5-1.0 1.0-2.0 0-0.5 0.5-1.0 1.0-2.0 0-0.5 0.5-1.0 1.0-2.0 2.0-3.0</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Corriher</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Bakewise: The Hows and Whys of Successful Baking</article-title>
          . Scribner, New York (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ruhlman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ratio: The Simple Codes Behind the Craft of Everyday Cooking</article-title>
          . Scribner, New York (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Wolf</surname>
            ,
            <given-names>K.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goetze</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wallho</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>CooCo, What Can I Cook Today? Surprise Me</article-title>
          .
          <source>Workshop Proceedings from the Twenty-Third International Conference on CaseBased Reasoning. ICCBR 2015</source>
          .
          <string-name>
            <surname>Columbus</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Ohene</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Michael Ohene's Cookie Recipe Generator</article-title>
          . Cooking for Engineers, http://www.cookingforengineers.com/article/309/
          <string-name>
            <surname>Michael-Ohenes-Cookie-</surname>
          </string-name>
          Recipe-Generator
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ohene</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Analyzing a Baking Recipe</article-title>
          . Cooking for Engineers, http://www. cookingforengineers.com/article/280/Analyzing-a-Baking-Recipe
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Chef</given-names>
            <surname>Watson</surname>
          </string-name>
          , http://www.ibmchefwatson.com
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Badra</surname>
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cordier</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lieber</surname>
            <given-names>J</given-names>
          </string-name>
          .:
          <article-title>Opportunistic Adaptation Knowledge Discovery</article-title>
          . In: McGinty L., Wilson D.C. (eds)
          <source>Case-Based Reasoning Research and Development. ICCBR 2009. LNCS</source>
          , vol.
          <volume>5650</volume>
          . Springer, Berlin, Heidelberg (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gaillard</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lieber</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nauer</surname>
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>Improving Ingredient Substitution Using Formal Concept Analysis and Adaptation of Ingredient Quantities with Mixed Linear Optimization</article-title>
          .
          <source>Proceedings from the Twenty-Third International Conference on CaseBased Reasoning. ICCBR 2015</source>
          .
          <string-name>
            <surname>Columbus</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gaillard</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lieber</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nauer</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cordier</surname>
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>How Case-Based Reasoning on eCommunity Knowledge Can Be Improved Thanks to Knowledge Reliability</article-title>
          .
          <source>CaseBased Reasoning Research and Development, Sep</source>
          <year>2014</year>
          , Cork, Ireland, Ireland.
          <volume>8765</volume>
          ,
          <fpage>155</fpage>
          -
          <lpage>169</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>10. bakeFromScratch, http://www.bakefromscratch.com/</mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Megan's Granola</surname>
          </string-name>
          , http://allrecipes.com/recipe/98390/megans-granola/
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Mary's Sugar</surname>
            <given-names>Cookies</given-names>
          </string-name>
          , http://allrecipes.com/recipe/23750/ marys-sugar-cookies/
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>