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

@@ -4,14 +4,13 @@
\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}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Baysian net modeling user preferences}}{1}}
\newlabel{img:bayes_net}{{1}{1}}
\bibcite{janzenxiang}{2} \bibcite{janzenxiang}{2}
\bibcite{russelnorvig}{3} \bibcite{russelnorvig}{3}
\bibcite{truyen}{4} \bibcite{truyen}{4}
\bibcite{vanboekel}{5} \bibcite{vanboekel}{5}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Baysian net modeling user preferences}}{2}}
\newlabel{img:bayes_net}{{1}{2}}

View File

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