Merge branch 'master' of woodyfolsom.net:/opt/git/cs6601p2

Conflicts:
	src/net/woodyfolsom/cs6601/p2/BayesChef.java
This commit is contained in:
Woody Folsom
2012-03-12 15:59:35 -04:00
11 changed files with 724 additions and 415 deletions

View File

@@ -1796,7 +1796,7 @@ with crunbled bacon and grated cheese to taste.</step>
</recipe> </recipe>
<recipe> <recipe>
<head> <head>
<title>Tabasco Classic - Perfect Seared Steaks ****</title> <title>Tabasco Classic Seared Steaks</title>
<source/> <source/>
<categories> <categories>
<cat>Tabasco</cat> <cat>Tabasco</cat>
@@ -2152,14 +2152,15 @@ couple inches margin around for sauce --- see above). VEGAN/OVO.
</recipe> </recipe>
<recipe> <recipe>
<head> <head>
<title>Black Bean Soup</title> <title>Lemon Pork Chops</title>
<source/> <source/>
<categories> <categories>
<cat>Appetizers</cat> <cat>Easy</cat>
<cat>Vegetarian</cat> <cat>Low-cal</cat>
<cat>Soups</cat> <cat>Main dish</cat>
<cat>Pork</cat>
</categories> </categories>
<yield>6<unit>servings</unit> <yield>4<unit>servings</unit>
</yield> </yield>
<preptime type="Total"> <preptime type="Total">
<time> <time>
@@ -2171,82 +2172,18 @@ couple inches margin around for sauce --- see above). VEGAN/OVO.
<ingredients> <ingredients>
<ing> <ing>
<amt> <amt>
<qty>1</qty> <qty>4</qty>
<unit>pound</unit>
</amt>
<item>Black beans</item>
<prep>soaked</prep>
</ing>
<ing>
<amt>
<qty>8</qty>
<unit>cups</unit>
</amt>
<item>water</item>
<prep></prep>
</ing>
<ing>
<amt>
<qty>2</qty>
<unit>tablespoons</unit>
</amt>
<item>salt</item>
<prep></prep>
</ing>
<ing>
<amt>
<qty>1</qty>
<unit>cup</unit>
</amt>
<item>onion</item>
<prep>chopped</prep>
</ing>
<ing>
<amt>
<qty>1</qty>
<unit>cup</unit>
</amt>
<item>green pepper</item>
<prep>chopped</prep>
</ing>
<ing>
<amt>
<qty>1</qty>
<unit>cup</unit>
</amt>
<item>celery</item>
<prep>chopped</prep>
</ing>
<ing>
<amt>
<qty>1</qty>
<unit>cup</unit>
</amt>
<item>carrots</item>
<prep>chopped</prep>
</ing>
<ing>
<amt>
<qty>8</qty>
<unit>tablespoons</unit>
</amt>
<item>olive oil</item>
<prep></prep>
</ing>
<ing>
<amt>
<qty>6</qty>
<unit></unit> <unit></unit>
</amt> </amt>
<item>garlic cloves</item> <item>Pork Loin Or Rib Chops</item>
<prep></prep> <prep>3/4"</prep>
</ing> </ing>
<ing> <ing>
<amt> <amt>
<qty>1</qty> <qty>0</qty>
<unit>tablespoon</unit> <unit></unit>
</amt> </amt>
<item>cumin</item> <item>salt</item>
<prep></prep> <prep></prep>
</ing> </ing>
<ing> <ing>
@@ -2254,32 +2191,41 @@ couple inches margin around for sauce --- see above). VEGAN/OVO.
<qty>4</qty> <qty>4</qty>
<unit>teaspoons</unit> <unit>teaspoons</unit>
</amt> </amt>
<item>white vinegar</item> <item>Thin onion slices</item>
<prep></prep> <prep></prep>
</ing> </ing>
<ing> <ing>
<amt> <amt>
<qty>1</qty> <qty>4</qty>
<unit>teaspoon</unit> <unit>teaspoons</unit>
</amt> </amt>
<item>soy sauce</item> <item>Thin lemon slices</item>
<prep></prep>
</ing>
<ing>
<amt>
<qty>4</qty>
<unit>tablespoons</unit>
</amt>
<item>Packed brown sugar</item>
<prep></prep>
</ing>
<ing>
<amt>
<qty>4</qty>
<unit>tablespoons</unit>
</amt>
<item>ketchup</item>
<prep></prep> <prep></prep>
</ing> </ing>
</ingredients> </ingredients>
<directions> <directions>
<step>Simmer beans in water till soft. <step>Heat oven to 350F. Sprinkle both sides of pork chops with salt.
Place pork in ungreased shallow baking pan or dish. Top each with
Saute onions, pepper, celery &amp; carrots in olive oil til the onions onion slice, lemon slice, 1 Tbsp brown sugar and 1 Tbsp ketchup.
turn golden brown. Add garlic, cumin, vinegar &amp; soy sauce. Cook, Cover and bake for 30 minutes. Uncover and bake for about 30 minutes
stirring for 3 minutes. longer, spooning sauce onto pork occasionally, until done. 4
Servings, 410 calories per serving.</step>
Drain about 1/2 c water from beans &amp; add it to the saute. Cook over
a low heat for 30 minutes.
Combine vegetables with beans. Cook for another 30 minutes, adding
more water if necessary.
Joel Rapp, "Mother Nature's Vegetarian Feasts"</step>
</directions> </directions>
</recipe> </recipe>
<recipe> <recipe>
@@ -2643,7 +2589,7 @@ California Beach Recipe" by Joan and Carl Stromquist ISBN:
</recipe> </recipe>
<recipe> <recipe>
<head> <head>
<title>EGGPLANT LASAGNE</title> <title>Eggplant Lasagna</title>
<source/> <source/>
<categories> <categories>
<cat>Vegan</cat> <cat>Vegan</cat>

View File

@@ -3,23 +3,23 @@
<dishes> <dishes>
<entry> <entry>
<int>0</int> <int>0</int>
<string>Catalan Rice</string>
</entry>
<entry>
<int>1</int>
<string>Hamburger Steak</string> <string>Hamburger Steak</string>
</entry> </entry>
<entry>
<int>1</int>
<string>Ice Cream, Lowfat</string>
</entry>
<entry> <entry>
<int>2</int> <int>2</int>
<string>Potatoes in a Thick Sauce</string> <string>Margarita Sunrise</string>
</entry> </entry>
<entry> <entry>
<int>3</int> <int>3</int>
<string>Tomato-Zucchini Casserole</string> <string>Weinerschnitzel</string>
</entry> </entry>
<entry> <entry>
<int>4</int> <int>4</int>
<string>Honey Cake</string> <string>Blender Double Fudge Cake</string>
</entry> </entry>
<entry> <entry>
<int>5</int> <int>5</int>
@@ -27,19 +27,75 @@
</entry> </entry>
<entry> <entry>
<int>6</int> <int>6</int>
<string>Kahlua Cake</string> <string>Coconut Beer Batter Shrimp</string>
</entry> </entry>
<entry> <entry>
<int>7</int> <int>7</int>
<string>Ice Cream, Lowfat</string> <string>Coconut Fish Curry</string>
</entry> </entry>
<entry> <entry>
<int>8</int> <int>8</int>
<string>Blender Double Fudge Cake</string> <string>Catalan Rice</string>
</entry> </entry>
<entry> <entry>
<int>9</int> <int>9</int>
<string>Weinerschnitzel</string> <string>Tomato-Zucchini Casserole</string>
</entry>
<entry>
<int>10</int>
<string>Tabasco Classic Seared Steaks</string>
</entry>
<entry>
<int>11</int>
<string>Honey cake</string>
</entry>
<entry>
<int>12</int>
<string>Southwest Smoothie</string>
</entry>
<entry>
<int>13</int>
<string>Bayou Shrimp Creole</string>
</entry>
<entry>
<int>14</int>
<string>Crab Burgers</string>
</entry>
<entry>
<int>15</int>
<string>Broiled Flounder</string>
</entry>
<entry>
<int>16</int>
<string>Baked Steak And Lima Beans</string>
</entry>
<entry>
<int>17</int>
<string>Eggplant Lasagna</string>
</entry>
<entry>
<int>18</int>
<string>Salisbury Steak with Mushroom Sauce</string>
</entry>
<entry>
<int>19</int>
<string>Meatless Loaf</string>
</entry>
<entry>
<int>20</int>
<string>Lemon Pork Chops</string>
</entry>
<entry>
<int>21</int>
<string>Fava Bean Burgers</string>
</entry>
<entry>
<int>22</int>
<string>Angel Hair Pesto Primavera</string>
</entry>
<entry>
<int>23</int>
<string>Kahlua Cake</string>
</entry> </entry>
</dishes> </dishes>
<categories> <categories>
@@ -53,15 +109,16 @@
</entry> </entry>
</categories> </categories>
<diner> <diner>
<description>No allergies, prefers all dishes equally (5)</description>
<id>0</id> <id>0</id>
<ratings> <ratings>
<entry> <entry>
<int>0</int> <int>0</int>
<int>10</int> <int>5</int>
</entry> </entry>
<entry> <entry>
<int>1</int> <int>1</int>
<int>2</int> <int>5</int>
</entry> </entry>
<entry> <entry>
<int>2</int> <int>2</int>
@@ -95,6 +152,62 @@
<int>9</int> <int>9</int>
<int>5</int> <int>5</int>
</entry> </entry>
<entry>
<int>10</int>
<int>5</int>
</entry>
<entry>
<int>11</int>
<int>5</int>
</entry>
<entry>
<int>12</int>
<int>5</int>
</entry>
<entry>
<int>13</int>
<int>5</int>
</entry>
<entry>
<int>14</int>
<int>5</int>
</entry>
<entry>
<int>15</int>
<int>5</int>
</entry>
<entry>
<int>16</int>
<int>5</int>
</entry>
<entry>
<int>17</int>
<int>5</int>
</entry>
<entry>
<int>18</int>
<int>5</int>
</entry>
<entry>
<int>19</int>
<int>5</int>
</entry>
<entry>
<int>20</int>
<int>5</int>
</entry>
<entry>
<int>21</int>
<int>5</int>
</entry>
<entry>
<int>22</int>
<int>5</int>
</entry>
<entry>
<int>23</int>
<int>5</int>
</entry>
</ratings> </ratings>
<categories> <categories>
<entry> <entry>
@@ -108,47 +221,104 @@
</categories> </categories>
</diner> </diner>
<diner> <diner>
<description>Vegetarian, all meat is (1) everything else is (9)</description>
<id>1</id> <id>1</id>
<ratings> <ratings>
<entry> <entry>
<int>0</int> <int>0</int>
<int>0</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>1</int> <int>1</int>
<int>0</int> <int>9</int>
</entry> </entry>
<entry> <entry>
<int>2</int> <int>2</int>
<int>5</int> <int>9</int>
</entry> </entry>
<entry> <entry>
<int>3</int> <int>3</int>
<int>6</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>4</int> <int>4</int>
<int>5</int> <int>9</int>
</entry> </entry>
<entry> <entry>
<int>5</int> <int>5</int>
<int>5</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>6</int> <int>6</int>
<int>5</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>7</int> <int>7</int>
<int>5</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>8</int> <int>8</int>
<int>5</int> <int>1</int>
</entry> </entry>
<entry> <entry>
<int>9</int> <int>9</int>
<int>5</int> <int>9</int>
</entry>
<entry>
<int>10</int>
<int>1</int>
</entry>
<entry>
<int>11</int>
<int>9</int>
</entry>
<entry>
<int>12</int>
<int>9</int>
</entry>
<entry>
<int>13</int>
<int>1</int>
</entry>
<entry>
<int>14</int>
<int>1</int>
</entry>
<entry>
<int>15</int>
<int>1</int>
</entry>
<entry>
<int>16</int>
<int>1</int>
</entry>
<entry>
<int>17</int>
<int>9</int>
</entry>
<entry>
<int>18</int>
<int>1</int>
</entry>
<entry>
<int>19</int>
<int>9</int>
</entry>
<entry>
<int>20</int>
<int>1</int>
</entry>
<entry>
<int>21</int>
<int>9</int>
</entry>
<entry>
<int>22</int>
<int>9</int>
</entry>
<entry>
<int>23</int>
<int>1</int>
</entry> </entry>
</ratings> </ratings>
<categories> <categories>
@@ -163,48 +333,105 @@
</categories> </categories>
</diner> </diner>
<diner> <diner>
<description>Nut Alleregy, prefers meat (6) to vegetarian (4) to desert (3)</description>
<id>2</id> <id>2</id>
<ratings> <ratings>
<entry> <entry>
<int>0</int> <int>0</int>
<int>9</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>1</int> <int>1</int>
<int>2</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>2</int> <int>2</int>
<int>2</int> <int>5</int>
</entry> </entry>
<entry> <entry>
<int>3</int> <int>3</int>
<int>2</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>4</int> <int>4</int>
<int>5</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>5</int> <int>5</int>
<int>0</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>6</int> <int>6</int>
<int>5</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>7</int> <int>7</int>
<int>5</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>8</int> <int>8</int>
<int>5</int> <int>6</int>
</entry> </entry>
<entry> <entry>
<int>9</int> <int>9</int>
<int>4</int>
</entry>
<entry>
<int>10</int>
<int>6</int>
</entry>
<entry>
<int>11</int>
<int>3</int>
</entry>
<entry>
<int>12</int>
<int>5</int> <int>5</int>
</entry> </entry>
<entry>
<int>13</int>
<int>6</int>
</entry>
<entry>
<int>14</int>
<int>6</int>
</entry>
<entry>
<int>15</int>
<int>6</int>
</entry>
<entry>
<int>16</int>
<int>6</int>
</entry>
<entry>
<int>17</int>
<int>4</int>
</entry>
<entry>
<int>18</int>
<int>6</int>
</entry>
<entry>
<int>19</int>
<int>4</int>
</entry>
<entry>
<int>20</int>
<int>6</int>
</entry>
<entry>
<int>21</int>
<int>4</int>
</entry>
<entry>
<int>22</int>
<int>4</int>
</entry>
<entry>
<int>23</int>
<int>3</int>
</entry>
</ratings> </ratings>
<categories> <categories>
<entry> <entry>
@@ -218,47 +445,104 @@
</categories> </categories>
</diner> </diner>
<diner> <diner>
<description>No allergies, only prefers Pork and Desserts(9) everything else is (3)</description>
<id>3</id> <id>3</id>
<ratings> <ratings>
<entry> <entry>
<int>0</int> <int>0</int>
<int>9</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>1</int> <int>1</int>
<int>2</int> <int>9</int>
</entry> </entry>
<entry> <entry>
<int>2</int> <int>2</int>
<int>2</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>3</int> <int>3</int>
<int>2</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>4</int> <int>4</int>
<int>5</int> <int>9</int>
</entry> </entry>
<entry> <entry>
<int>5</int> <int>5</int>
<int>7</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>6</int> <int>6</int>
<int>5</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>7</int> <int>7</int>
<int>5</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>8</int> <int>8</int>
<int>5</int> <int>3</int>
</entry> </entry>
<entry> <entry>
<int>9</int> <int>9</int>
<int>5</int> <int>3</int>
</entry>
<entry>
<int>10</int>
<int>3</int>
</entry>
<entry>
<int>11</int>
<int>3</int>
</entry>
<entry>
<int>12</int>
<int>3</int>
</entry>
<entry>
<int>13</int>
<int>3</int>
</entry>
<entry>
<int>14</int>
<int>3</int>
</entry>
<entry>
<int>15</int>
<int>3</int>
</entry>
<entry>
<int>16</int>
<int>3</int>
</entry>
<entry>
<int>17</int>
<int>3</int>
</entry>
<entry>
<int>18</int>
<int>3</int>
</entry>
<entry>
<int>19</int>
<int>3</int>
</entry>
<entry>
<int>20</int>
<int>9</int>
</entry>
<entry>
<int>21</int>
<int>3</int>
</entry>
<entry>
<int>22</int>
<int>3</int>
</entry>
<entry>
<int>23</int>
<int>9</int>
</entry> </entry>
</ratings> </ratings>
<categories> <categories>

View File

@@ -10,6 +10,11 @@ public class Diner {
private int id; private int id;
private Map<Integer,Integer> ratings = new HashMap<Integer,Integer>(); private Map<Integer,Integer> ratings = new HashMap<Integer,Integer>();
private Map<Integer,Boolean> categories = new HashMap<Integer,Boolean>(); private Map<Integer,Boolean> categories = new HashMap<Integer,Boolean>();
private String description;
public String getDescription() {
return description;
}
public int getId() { public int getId() {
return id; return id;

View File

@@ -24,7 +24,6 @@ public class RecipeBookReaderTest {
assertThat(recipeBook.getSize(), is(equalTo(25))); assertThat(recipeBook.getSize(), is(equalTo(25)));
Recipe recipe = recipeBook.getRecipe(0); Recipe recipe = recipeBook.getRecipe(0);
System.out.println(recipe.getHead().getTitle());
assertThat(recipe.getHead().getTitle(), is(equalTo("Honey cake"))); assertThat(recipe.getHead().getTitle(), is(equalTo("Honey cake")));
assertTrue(recipe.getIngredients().contains(TYPE.EGGS)); assertTrue(recipe.getIngredients().contains(TYPE.EGGS));
assertTrue(recipe.getIngredients().contains(TYPE.GLUTEN)); assertTrue(recipe.getIngredients().contains(TYPE.GLUTEN));

View File

@@ -16,7 +16,7 @@ public class SurveyReaderTest {
Survey survey = SurveyReader.readSurvey(new File("data/long_survey.xml")); Survey survey = SurveyReader.readSurvey(new File("data/long_survey.xml"));
assertNotNull(survey); assertNotNull(survey);
assertThat(survey.getDishCount(), equalTo(10)); assertThat(survey.getDishCount(), equalTo(24));
assertThat(survey.getDinerCount(), equalTo(4)); assertThat(survey.getDinerCount(), equalTo(4));
assertThat(survey.isCategory(0,"vegetarian"), is(false)); assertThat(survey.isCategory(0,"vegetarian"), is(false));
@@ -28,9 +28,21 @@ public class SurveyReaderTest {
assertThat(survey.isCategory(2,"vegan"), is(false)); assertThat(survey.isCategory(2,"vegan"), is(false));
assertThat(survey.isCategory(2,"allergic-nuts"), is(true)); assertThat(survey.isCategory(2,"allergic-nuts"), is(true));
assertThat(survey.isCategory(3,"vegan"), is(false));
assertThat(survey.isCategory(3,"allergic-nuts"), is(false));
assertThat(survey.isDiner("vegetarian"), is(true)); assertThat(survey.isDiner("vegetarian"), is(true));
assertThat(survey.isDiner("allergic-nuts"), is(true)); assertThat(survey.isDiner("allergic-nuts"), is(true));
assertThat(survey.isDiner("rastafarian"), is(false)); assertThat(survey.isDiner("rastafarian"), is(false));
for (int i=0;i<survey.getDinerCount();i++) {
Diner diner = survey.getDiner(i);
System.out.println("\n");
System.out.println("Diner " + i + " (" + diner.getDescription() + ")");
for (int j=0;j<survey.getDishCount();j++) {
System.out.println(j +") " +survey.getDish(j) + ": " + diner.getRating(j));
}
}
} }
@Test @Test

View File

@@ -1,17 +1,16 @@
\relax \relax
\citation{vanboekel} \citation{vanboekel}
\citation{corney} \citation{corney}
\citation{janzenxiang} \citation{janzenxiang}
\citation{truyen} \citation{truyen}
\citation{russelnorvig} \citation{russelnorvig}
\citation{russelnorvig} \citation{murphy}
\citation{russelnorvig} \bibstyle{plain}
\bibstyle{plain} \bibdata{p2refs}
\bibdata{p2refs} \bibcite{corney}{1}
\bibcite{corney}{1} \bibcite{janzenxiang}{2}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Baysian net modeling user preferences}}{1}} \bibcite{russelnorvig}{3}
\newlabel{img:bayes_net}{{1}{1}} \bibcite{truyen}{4}
\bibcite{janzenxiang}{2} \bibcite{vanboekel}{5}
\bibcite{russelnorvig}{3} \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Baysian net modeling user preferences}}{2}}
\bibcite{truyen}{4} \newlabel{img:bayes_net}{{1}{2}}
\bibcite{vanboekel}{5}

View File

@@ -1,236 +1,259 @@
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.11) 2 MAR 2012 14:28 This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) (format=pdflatex 2011.7.20) 12 MAR 2012 12:48
entering extended mode entering extended mode
**C:/Users/Woody/Desktop/GaTechMS/Spring*2012/CS6601*AI/Project*2/P2*Proposal.t restricted \write18 enabled.
ex %&-line parsing enabled.
**"P2 Proposal.tex"
("C:/Users/Woody/Desktop/GaTechMS/Spring 2012/CS6601 AI/Project 2/P2 Proposal.t (./P2 Proposal.tex
ex" LaTeX2e <2009/09/24>
LaTeX2e <2011/06/27> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar rman-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, arabic, armenian
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, , basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutch, u
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga kenglish, usenglishmax, esperanto, estonian, farsi, finnish, french, galician,
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic, assamese,
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panjabi, tamil,
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm telugu, indonesian, interlingua, irish, italian, kurmanji, lao, latin, latvian,
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portuguese, roma
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis nian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish,
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u turkmen, ukrainian, uppersorbian, welsh, loaded.
senglishmax, welsh, loaded. (/usr/local/texlive/2010/texmf-dist/tex/latex/base/article.cls
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls" Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/local/texlive/2010/texmf-dist/tex/latex/base/size10.clo
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo" File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) )
) \c@part=\count79
\c@part=\count79 \c@section=\count80
\c@section=\count80 \c@subsection=\count81
\c@subsection=\count81 \c@subsubsection=\count82
\c@subsubsection=\count82 \c@paragraph=\count83
\c@paragraph=\count83 \c@subparagraph=\count84
\c@subparagraph=\count84 \c@figure=\count85
\c@figure=\count85 \c@table=\count86
\c@table=\count86 \abovecaptionskip=\skip41
\abovecaptionskip=\skip41 \belowcaptionskip=\skip42
\belowcaptionskip=\skip42 \bibindent=\dimen102
\bibindent=\dimen102 ) (./latex8.sty
) IEEE 8.5 x 11-Inch Proceedings Style `latex8.sty'.
("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\latex8.sty" \@ctmp=\skip43
IEEE 8.5 x 11-Inch Proceedings Style `latex8.sty'. \@figindent=\skip44
\@ctmp=\skip43 ) (/usr/local/texlive/2010/texmf-dist/tex/latex/titlesec/titlesec.sty
\@figindent=\skip44 Package: titlesec 2007/08/12 v2.8 Sectioning titles
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\titlesec\titlesec.sty" \ttl@box=\box26
Package: titlesec 2011/12/15 v2.10.0 Sectioning titles \beforetitleunit=\skip45
\ttl@box=\box26 \aftertitleunit=\skip46
\beforetitleunit=\skip45 \ttl@plus=\dimen103
\aftertitleunit=\skip46 \ttl@minus=\dimen104
\ttl@plus=\dimen103 \ttl@toksa=\toks14
\ttl@minus=\dimen104 \titlewidth=\dimen105
\ttl@toksa=\toks14 \titlewidthlast=\dimen106
\titlewidth=\dimen105 \titlewidthfirst=\dimen107
\titlewidthlast=\dimen106 )
\titlewidthfirst=\dimen107 (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/graphicx.sty
) Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
Package: geometry 2010/09/12 v5.6 Page Geometry (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty" \KV@toks@=\toks15
Package: keyval 1999/03/16 v1.13 key=value parser (DPC) )
\KV@toks@=\toks15 (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/graphics.sty
) Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/trig.sty
Package ifpdf Info: pdfTeX in PDF mode is detected. Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
) )
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty" (/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/graphics.cfg
Package: ifvtex 2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO) File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
Package ifvtex Info: VTeX not detected. )
) Package graphics Info: Driver file: pdftex.def on input line 91.
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional (/usr/local/texlive/2010/texmf-dist/tex/latex/pdftex-def/pdftex.def
) File: pdftex.def 2010/02/14 v0.04n Graphics/color for pdfTeX
\Gm@cnth=\count87 \Gread@gobject=\count87
\Gm@cntv=\count88 ))
\c@Gm@tempcnt=\count89 \Gin@req@height=\dimen108
\Gm@bindingoffset=\dimen108 \Gin@req@width=\dimen109
\Gm@wd@mp=\dimen109 )
\Gm@odd@mp=\dimen110 (/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amsmath.sty
\Gm@even@mp=\dimen111 Package: amsmath 2000/07/18 v2.13 AMS math features
\Gm@layoutwidth=\dimen112 \@mathmargin=\skip47
\Gm@layoutheight=\dimen113
\Gm@layouthoffset=\dimen114 For additional information on amsmath, use the `?' option.
\Gm@layoutvoffset=\dimen115 (/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amstext.sty
\Gm@dimlist=\toks16 Package: amstext 2000/06/29 v2.01
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg")) (/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amsgen.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty" File: amsgen.sty 1999/11/30 v2.0
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) \@emptytoks=\toks16
\ex@=\dimen110
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty" ))
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR) (/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty" \pmbraise@=\dimen111
Package: trig 1999/03/16 v1.09 sin cos tan (DPC) )
) (/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amsopn.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg" Package: amsopn 1999/12/14 v2.01 operator names
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive )
) \inf@bad=\count88
Package graphics Info: Driver file: pdftex.def on input line 91. LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count89
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def" \leftroot@=\count90
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count91
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty" \DOTSCASE@=\count92
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO) LaTeX Info: Redefining \ldots on input line 379.
) LaTeX Info: Redefining \dots on input line 382.
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty" LaTeX Info: Redefining \cdots on input line 467.
Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO) \Mathstrutbox@=\box27
) \strutbox@=\box28
\Gread@gobject=\count90 \big@size=\dimen112
)) LaTeX Font Info: Redeclaring font encoding OML on input line 567.
\Gin@req@height=\dimen116 LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\Gin@req@width=\dimen117 \macc@depth=\count93
) \c@MaxMatrixCols=\count94
\dotsspace@=\muskip10
LaTeX Warning: Unused global option(s): \c@parentequation=\count95
[times,08pt]. \dspbrk@lvl=\count96
\tag@help=\toks17
\row@=\count97
("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\P2 Proposal.a \column@=\count98
ux") \maxfields@=\count99
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 10. \andhelp@=\toks18
LaTeX Font Info: ... okay on input line 10. \eqnshift@=\dimen113
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 10. \alignsep@=\dimen114
LaTeX Font Info: ... okay on input line 10. \tagshift@=\dimen115
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 10. \tagwidth@=\dimen116
LaTeX Font Info: ... okay on input line 10. \totwidth@=\dimen117
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 10. \lineht@=\dimen118
LaTeX Font Info: ... okay on input line 10. \@envbody=\toks19
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 10. \multlinegap=\skip48
LaTeX Font Info: ... okay on input line 10. \multlinetaggap=\skip49
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 10. \mathdisplay@stack=\toks20
LaTeX Font Info: ... okay on input line 10. LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
*geometry* driver: auto-detecting )
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result: LaTeX Warning: Unused global option(s):
* driver: pdftex [times,08pt].
* paper: <default>
* layout: <same size as paper> (./P2 Proposal.aux)
* layoutoffset:(h,v)=(0.0pt,0.0pt) \openout1 = `"P2 Proposal.aux"'.
* modes:
* h-part:(L,W,R)=(36.135pt, 542.02501pt, 36.135pt) LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
* v-part:(T,H,B)=(36.135pt, 722.7pt, 36.135pt) LaTeX Font Info: ... okay on input line 11.
* \paperwidth=614.295pt LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
* \paperheight=794.96999pt LaTeX Font Info: ... okay on input line 11.
* \textwidth=542.02501pt LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
* \textheight=722.7pt LaTeX Font Info: ... okay on input line 11.
* \oddsidemargin=-36.135pt LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
* \evensidemargin=-36.135pt LaTeX Font Info: ... okay on input line 11.
* \topmargin=-36.135pt LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
* \headheight=0.0pt LaTeX Font Info: ... okay on input line 11.
* \headsep=0.0pt LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
* \topskip=10.0pt LaTeX Font Info: ... okay on input line 11.
* \footskip=30.0pt
* \marginparwidth=4.0pt (/usr/local/texlive/2010/texmf-dist/tex/context/base/supp-pdf.mkii
* \marginparsep=10.0pt [Loading MPS to PDF converter (version 2006.09.02).]
* \columnsep=22.58437pt \scratchcounter=\count100
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt \scratchdimen=\dimen119
* \hoffset=0.0pt \scratchbox=\box29
* \voffset=0.0pt \nofMPsegments=\count101
* \mag=1000 \nofMParguments=\count102
* \@twocolumntrue \everyMPshowfont=\toks21
* \@twosidefalse \MPscratchCnt=\count103
* \@mparswitchfalse \MPscratchDim=\dimen120
* \@reversemarginfalse \MPnumerator=\count104
* (1in=72.27pt=25.4mm, 1cm=28.453pt) \everyMPtoPDFconversion=\toks22
) (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii" Package: pdftexcmds 2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen118 (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/infwarerr.sty
\scratchbox=\box27 Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)
\nofMPsegments=\count92 )
\nofMParguments=\count93 (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifluatex.sty
\everyMPshowfont=\toks17 Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
\MPscratchCnt=\count94 Package ifluatex Info: LuaTeX not detected.
\MPscratchDim=\dimen119 )
\MPnumerator=\count95 (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
\makeMPintoPDFobject=\count96 Package: ltxcmds 2010/04/26 v1.7 LaTeX kernel commands for general use (HO)
\everyMPtoPDFconversion=\toks18 )
) Package pdftexcmds Info: LuaTeX not detected.
LaTeX Font Info: External font `cmex10' loaded for size Package pdftexcmds Info: \pdf@primitive is available.
(Font) <12> on input line 17. Package pdftexcmds Info: \pdf@ifprimitive is available.
LaTeX Font Info: External font `cmex10' loaded for size )
(Font) <8> on input line 17. (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
LaTeX Font Info: External font `cmex10' loaded for size Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
(Font) <6> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/grfext.sty
(Font) <7> on input line 80. Package: grfext 2007/09/30 v1.0 Managing graphics extensions (HO)
LaTeX Font Info: External font `cmex10' loaded for size )
(Font) <5> on input line 80. (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/kvoptions.sty
<bayes.jpeg, id=1, 994.71625pt x 644.4075pt> Package: kvoptions 2010/02/22 v3.7 Keyval support for LaTeX options (HO)
File: bayes.jpeg Graphic file (type jpg)
<use bayes.jpeg> (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package pdftex.def Info: bayes.jpeg used on input line 88. Package: kvsetkeys 2010/03/01 v1.9 Key value parser (HO)
(pdftex.def) Requested size: 259.72032pt x 168.24995pt.
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/etexcmds.sty
("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\P2 Proposal.b Package: etexcmds 2010/01/28 v1.3 Prefix for e-TeX command names (HO)
bl" Package etexcmds Info: Could not find \expanded.
Underfull \vbox (badness 10000) has occurred while \output is active [] (etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
[1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map} (etexcmds) In the latter case, load this package earlier.
)))
Package grfext Info: Graphics extension search list:
<C:/Users/Woody/Desktop/GaTechMS/Spring 2012/CS6601 AI/Project 2/bayes.jpeg>] (grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
Underfull \hbox (badness 3396) in paragraph at lines 21--26 G,.JBIG2,.JB2,.eps]
[]\OT1/cmr/m/n/10 Tran The Truyen, Dinh Q. Phung, and Svetha (grfext) \AppendGraphicsExtensions on input line 436.
[]
(/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
) [2 File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
] ))
("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\P2 Proposal.a <bayes.png, id=1, 993.7125pt x 596.2275pt>
ux") ) File: bayes.png Graphic file (type png)
Here is how much of TeX's memory you used: <use bayes.png>
1913 strings out of 494045
26388 string characters out of 3145969 LaTeX Warning: Citation `murphy' on page 1 undefined on input line 117.
90866 words of memory out of 3000000
5218 multiletter control sequences out of 15000+200000 [1{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map}
9590 words of font info for 30 fonts, out of 3000000 for 9000
715 hyphenation exceptions out of 8191
27i,7n,32p,469b,212s stack positions out of 5000i,500n,10000p,200000b,50000s ]
{C:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Pr
ogram Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx12.pfb><C:/Prog Package amsmath Warning: Foreign command \over;
ram Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb><C:/Progra (amsmath) \frac or \genfrac should be used instead
m Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi7.pfb><C:/Program F (amsmath) on input line 137.
iles (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb><C:/Program File
s (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/Program Files ( (./P2 Proposal.bbl
x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/Program Files (x86) Underfull \vbox (badness 2512) has occurred while \output is active []
/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb><C:/Program Files (x86)/M
iKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti10.pfb><C:/Program Files (x86)/MiK ) [2 <./bayes.png (PNG copy)>] (./P2 Proposal.aux)
TeX 2.9/fonts/type1/urw/helvetic/uhvb8a.pfb>
Output written on "P2 Proposal.pdf" (2 pages, 239834 bytes). LaTeX Warning: There were undefined references.
PDF statistics:
47 PDF objects out of 1000 (max. 8388607) )
0 named destinations out of 1000 (max. 500000) Here is how much of TeX's memory you used:
6 words of extra memory for PDF output out of 10000 (max. 10000000) 2184 strings out of 493747
28746 string characters out of 3143546
93189 words of memory out of 3000000
5461 multiletter control sequences out of 15000+200000
11026 words of font info for 36 fonts, out of 3000000 for 9000
714 hyphenation exceptions out of 8191
38i,8n,28p,406b,211s stack positions out of 5000i,500n,10000p,200000b,50000s
{/usr/local/texlive/2010/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/t
exlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/te
xlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/local/tex
live/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/local/texl
ive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb></usr/local/texliv
e/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/
2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/local/texlive/20
10/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></usr/local/texlive/2010/
texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/local/texlive/2010/t
exmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></usr/local/texlive/2010/te
xmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb>
Output written on "P2 Proposal.pdf" (2 pages, 194457 bytes).
PDF statistics:
53 PDF objects out of 1000 (max. 8388607)
37 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
6 words of extra memory for PDF output out of 10000 (max. 10000000)

Binary file not shown.

View File

@@ -2,8 +2,9 @@
\usepackage{latex8} \usepackage{latex8}
\usepackage{titlesec} \usepackage{titlesec}
\usepackage[margin=0.5in]{geometry} % \usepackage[margin=0.5in]{geometry}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{amsmath}
\titleformat{\section}{\large\bfseries}{\thesection}{1em}{} \titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
@@ -24,9 +25,9 @@ given the exponential number of dishes which can be created from a
small number of ingredients, as well has hard constraints such as small number of ingredients, as well has hard constraints such as
allergies and religious beliefs. Many professional catering services allergies and religious beliefs. Many professional catering services
handle this problem by allowing guests to select from a very limited handle this problem by allowing guests to select from a very limited
menu. We propose to develop a dish recommendation system menu. We introduce a dish recommendation system
based on Bayesian Networks modeling user preferences and based on Bayesian Networks modeling user preferences.
which proposes meals that most likely match the varied tastes We predict the meals from a data base of recepices that most likely match the varied tastes
of the customers, using a limited set of ingredients. This type of expert system of the customers, using a limited set of ingredients. This type of expert system
would be of great use to a catering service or restaurant which needs to rapdily decide on would be of great use to a catering service or restaurant which needs to rapdily decide on
a small number of dishes which would be acceptable for a large dinner party, a small number of dishes which would be acceptable for a large dinner party,
@@ -41,26 +42,44 @@ and past food choices \cite{janzenxiang}. Baysian networks have also been
applied to recommendation systems before in on-line social applied to recommendation systems before in on-line social
networks \cite{truyen} making predictions of the form networks \cite{truyen} making predictions of the form
``if you bought those items what is the probability you would like to ``if you bought those items what is the probability you would like to
buy that''. We suggest that these approaches are limited in that they only consider the preferences of a single (or supposed 'typical') user rather than a group. buy that''. We suggest that these approaches are limited in that they
only consider the preferences of a single (or supposed 'typical') user rather than a group.
\section*{Proposed Approach} \section*{Approach}
The approached problem is to pick a single meal which best meets the requirements The approached problem is to pick a single meal which best meets the requirements
and tastes of different people dining together. and tastes of different people dining together. We learn a predictive
baysian net from a survey distributed to participants of the meal as
training data in order to capture their preferences. The dishes
in the questionaire are selected such that all ingrediants
are covered. The participants rate each dish on a scale from
one to ten and give additional information like vegetarians.
For new dishes we then predict the maximum likelihood
rating given our model.
In the following we will describe our approach in detail.
First we will discuss the data selection, then the
modeling of the user preference and in the
end how to train the modeled net from
gathered data and howe to predict the
value for a new recepice.
%\subsection*{Application Framework} \paragraph*{Data accuisition}
First, we will accumulate a diverse collection of sample recipes using the open source AnyMeal application We accumulated a diverse collection of sample recipes using the open source AnyMeal application.
to convert freely available MealMaster format (flat file) recipes to XML format for input into the Java Bayesian network / optimization We converted to the freely available MealMaster format (flat file)
application we propose. recipes to XML format for input into our application.
We will gathered data representing several diners' preference for
approximately 20 meals using a simple survey of the type 'rate on a
scale of 1 to 10, 10 being favorite and 1 being least favorite'.
Furthermore we collected data for vegetarians and vegans.
%\subsection*{Data Collection}
Next, we will gather data representing several diners' preference for approximately 20 meals using a simple survey of the type 'rate on a scale of 1 to 10, 10 being favorite and 1 being least favorite'. A value of 0 for a given dish will be taken to mean that one or more ingredients trigger and allergy or violate a religous constraint, and the diner cannot consume the dish.
%\subsection*{Model} %daniel is here
\paragraph*{Knowledge Engineering}
We will model each individual user's preferences and needs We will model each individual user's preferences and needs
as a Bayesian network, which means a set of independence and as a Bayesian network, which means a set of independence and
conditional independence relationships between variables conditional independence relationships between variables
\cite{russelnorvig}. Our model consists of 4 layers, \cite{russelnorvig}.
Our model consists of 4 layers,
each modeling a different aspect of taste and needs. each modeling a different aspect of taste and needs.
In the first layer we capture general meal preferences, like In the first layer we capture general meal preferences, like
being vegetarian or not liking your food steamed. being vegetarian or not liking your food steamed.
@@ -79,26 +98,48 @@ someone suffers from diabetes.
The overall net is shown in Figure \ref{img:bayes_net}. The overall net is shown in Figure \ref{img:bayes_net}.
Given a recipe with a list of ingredients $I = i_1,...,i_n$ Given a recipe with a list of ingredients $I = i_1,...,i_n$
and a Bayesian network capturing user preferences and a Bayesian network capturing user preferences
we can calculate the probability of users liking the dish as we can calculate the probability of users liking the dish given
$P(i_1 \wedge i_2 \wedge ... \wedge i_n) = \Pi_{i = the probabilities of liking each ingrediant.
1}^{n} p(i_i \mid parents(i_i))$ \cite{russelnorvig}.
\begin{figure} \begin{figure}
\centering \centering
\includegraphics[width=\linewidth]{bayes.jpeg} \includegraphics[width=\linewidth]{bayes}
\caption{Our Baysian net modeling user preferences} \caption{Our Baysian net modeling user preferences}
\label{img:bayes_net} \label{img:bayes_net}
\end{figure} \end{figure}
%\subsection*{implementation}
\paragraph*{Learning and Predicting}
In order to estimate the model parameters, the In order to estimate the model parameters, the
system will be trained with statistics about taste system will be trained with statistics about taste
and preferences given a set of dishes with ratings and preferences given a set of dishes with ratings
from multiple users. From that information we can directly calculate from multiple users. From that information we can directly calculate
the probabilities for the ingredients. the probabilities for the ingredients using Maximum Likelihood Learning \cite{murphy}.
%\subsection*{Meal Optimization} %\subsection*{Meal Optimization}
When learning the rest of the variables (that are not observed and therefore In order to model food preferences, we implemented
hidden / latent) we will use Expectation Maximization \cite{russelnorvig}. a baysian net library in java. The library
uses the sum-product algorithm for
inference and maximum likelihood learning
for parameter estimation. In our implementation
we support discrete as well as continous
probability distributions. Discrete distributions
can be modeled as tables or as trees.
In our implementation only continous distributions with discrete parents
are supported. A continous distribution is then modeled as a mapping
of all possible combination of it' s parents to a gaussian.
Given a data set, the parameters of a discrete variable $X$ are
estimated as
\begin{align}
P(X = x| Y_1 = y_1, ... Y_2 = y2) =\\
N(X = x| Y_1 = y_1, ... Y_2 = y2) \over N(Y_1 = y_1, ... Y_2 = y2)
\end{align}
where $N(A)$ is the number of times event $A$occurs in the data set.
We decided to implement our own Library,
so we understand what is going on and
we can debug and fix the models
and algorithms easily.
\section*{Evaluation} \section*{Evaluation}
The application model will be trained using a sparse subset (25-50\%) of the survey data and the optimization problem soled for the inferred constraints. The application model will be trained using a sparse subset (25-50\%) of the survey data and the optimization problem soled for the inferred constraints.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

BIN
writeup/bayes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB