diff --git a/build.xml b/build.xml
index 6d7fb00..529bdda 100644
--- a/build.xml
+++ b/build.xml
@@ -43,12 +43,11 @@
-
+
-
+
-
-
+
+
diff --git a/test/dkohl/bayes/example/builders/FoodExampleBuilder.java b/src/dkohl/bayes/builders/FoodExampleBuilder.java
similarity index 99%
rename from test/dkohl/bayes/example/builders/FoodExampleBuilder.java
rename to src/dkohl/bayes/builders/FoodExampleBuilder.java
index 3bcc9c8..7ee532f 100644
--- a/test/dkohl/bayes/example/builders/FoodExampleBuilder.java
+++ b/src/dkohl/bayes/builders/FoodExampleBuilder.java
@@ -1,4 +1,4 @@
-package dkohl.bayes.example.builders;
+package dkohl.bayes.builders;
import java.util.HashSet;
import java.util.LinkedList;
diff --git a/src/dkohl/bayes/builders/FoodNetBuilder.java b/src/dkohl/bayes/builders/FoodNetBuilder.java
index 9bc22ad..a04a2bf 100644
--- a/src/dkohl/bayes/builders/FoodNetBuilder.java
+++ b/src/dkohl/bayes/builders/FoodNetBuilder.java
@@ -10,7 +10,6 @@ import net.woodyfolsom.cs6601.p2.RecipeBook;
import net.woodyfolsom.cs6601.p2.Survey;
import dkohl.bayes.bayesnet.BayesNet;
import dkohl.bayes.estimation.MaximumLikelihoodEstimation;
-import dkohl.bayes.example.builders.FoodExampleBuilder;
import dkohl.bayes.probability.Assignment;
import dkohl.bayes.probability.Probability;
import dkohl.bayes.probability.Variable;
diff --git a/test/dkohl/bayes/example/FoodExampleTest.java b/test/dkohl/bayes/example/FoodExampleTest.java
index bbdc069..73879c0 100644
--- a/test/dkohl/bayes/example/FoodExampleTest.java
+++ b/test/dkohl/bayes/example/FoodExampleTest.java
@@ -9,7 +9,7 @@ import java.util.List;
import org.junit.Test;
import dkohl.bayes.bayesnet.BayesNet;
-import dkohl.bayes.example.builders.FoodExampleBuilder;
+import dkohl.bayes.builders.FoodExampleBuilder;
import dkohl.bayes.inference.EnumerateAll;
import dkohl.bayes.probability.ProbabilityAssignment;
import dkohl.bayes.probability.Variable;
diff --git a/writeup/P2 Proposal.aux b/writeup/P2 Proposal.aux
index 35a856e..7ced2ae 100644
--- a/writeup/P2 Proposal.aux
+++ b/writeup/P2 Proposal.aux
@@ -3,14 +3,19 @@
\citation{corney}
\citation{janzenxiang}
\citation{truyen}
+\citation{truyen}
\citation{murphy}
+\citation{murphy}
+\citation{russelnorvig}
+\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Bayesian net modeling user preferences. The top layer describes the categories Meat and Vegetable. We have a control variable vegetarian for Meat, such that it will always evaluate to $0$ when there is meat involved in a dish and we have a vegetarian diner. The mid layer describes the preference for different ingredients. The last layer is a Gaussian predicting the users preferences.}}{2}}
+\newlabel{img:bayes_net}{{1}{2}}
\bibstyle{plain}
\bibdata{p2refs}
\bibcite{corney}{1}
\bibcite{janzenxiang}{2}
\bibcite{murphy}{3}
-\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Our Baysian net modeling user preferences}}{2}}
-\newlabel{img:bayes_net}{{1}{2}}
-\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Estimated vs. Actual Survey Dish Ratings}}{2}}
-\bibcite{truyen}{4}
-\bibcite{vanboekel}{5}
+\bibcite{russelnorvig}{4}
+\bibcite{truyen}{5}
+\bibcite{vanboekel}{6}
+\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Estimated vs. surveyed dish ratings}}{3}}
+\newlabel{result}{{2}{3}}
diff --git a/writeup/P2 Proposal.bbl b/writeup/P2 Proposal.bbl
index 2092b90..c999c61 100644
--- a/writeup/P2 Proposal.bbl
+++ b/writeup/P2 Proposal.bbl
@@ -1,34 +1,39 @@
-\begin{thebibliography}{1}
-
-\bibitem{corney}
-David Corney.
-\newblock {Designing Food} with {Bayesian Belief Networks}.
-\newblock {\em ACDM}, 2000.
-
-\bibitem{janzenxiang}
-M.~Janzen and Y.~Xiang.
-\newblock {Probabilistic Reasoning} in {Meal Planning} in {Intelligent
- Fridges}.
-\newblock {\em 16th Conference of the Canadian Society for Computational
- Studies of Intelligence}, 2003.
-
-\bibitem{murphy}
-Kevin Murphy.
-\newblock A {Brief Introduction} to {Graphical Models} and {Bayesian Networks}.
-\newblock http://www.cs.ubc.ca/~murphyk/Bayes/bnintro.html, 1998.
-\newblock [Online; accessed 22-Feb-2012].
-
-\bibitem{truyen}
-Tran~The Truyen, Dinh~Q. Phung, and Svetha Venkatesh.
-\newblock Preference {Networks}: {Probabilistic} {Models} for {Recommendation}
- {Systems}.
-\newblock {\em Proceedings of the {Sixth Australasian Conference} on {Data
- Mining}}, 2007.
-
-\bibitem{vanboekel}
-Stein~A. van Boekel, M.A.J.S. and A.H.C. van Bruggen.
-\newblock {Bayesian Statistics} and {Quality Modelling} in the {Agro-food
- Production Chain}.
-\newblock {\em Proceedings of the Frontis workshop}, 2004.
-
-\end{thebibliography}
+\begin{thebibliography}{1}
+
+\bibitem{corney}
+David Corney.
+\newblock {Designing Food} with {Bayesian Belief Networks}.
+\newblock {\em ACDM}, 2000.
+
+\bibitem{janzenxiang}
+M.~Janzen and Y.~Xiang.
+\newblock {Probabilistic Reasoning} in {Meal Planning} in {Intelligent
+ Fridges}.
+\newblock {\em 16th Conference of the Canadian Society for Computational
+ Studies of Intelligence}, 2003.
+
+\bibitem{murphy}
+Kevin Murphy.
+\newblock A {Brief Introduction} to {Graphical Models} and {Bayesian Networks}.
+\newblock http://www.cs.ubc.ca/~murphyk/Bayes/bnintro.html, 1998.
+\newblock [Online; accessed 22-Feb-2012].
+
+\bibitem{russelnorvig}
+S.~Russel and P.~Norvig.
+\newblock {\em Artificial Intelligence; A Modern Approach}.
+\newblock Prentice Hall, third edition, 2010.
+
+\bibitem{truyen}
+Tran~The Truyen, Dinh~Q. Phung, and Svetha Venkatesh.
+\newblock Preference {Networks}: {Probabilistic} {Models} for {Recommendation}
+ {Systems}.
+\newblock {\em Proceedings of the {Sixth Australasian Conference} on {Data
+ Mining}}, 2007.
+
+\bibitem{vanboekel}
+Stein~A. van Boekel, M.A.J.S. and A.H.C. van Bruggen.
+\newblock {Bayesian Statistics} and {Quality Modelling} in the {Agro-food
+ Production Chain}.
+\newblock {\em Proceedings of the Frontis workshop}, 3, 2004.
+
+\end{thebibliography}
diff --git a/writeup/P2 Proposal.blg b/writeup/P2 Proposal.blg
index 81f4791..aa8e381 100644
--- a/writeup/P2 Proposal.blg
+++ b/writeup/P2 Proposal.blg
@@ -1,28 +1,51 @@
-This is BibTeX, Version 0.99dThe top-level auxiliary file: P2 Proposal.aux
-The style file: plain.bst
-Database file #1: p2refs.bib
-I was expecting a `,' or a `}'---line 14 of file p2refs.bib
- :
- : CITY = {Wageningen}
-(Error may have been on previous line)
-I'm skipping whatever remains of this entry
-I was expecting a `,' or a `}'---line 23 of file p2refs.bib
- :
- : CITY = {London}
-(Error may have been on previous line)
-I'm skipping whatever remains of this entry
-I was expecting a `,' or a `}'---line 31 of file p2refs.bib
- :
- : CITY = {London}
-(Error may have been on previous line)
-I'm skipping whatever remains of this entry
-I was expecting a `,' or a `}'---line 40 of file p2refs.bib
- :
- : CITY = {Guelph}
-(Error may have been on previous line)
-I'm skipping whatever remains of this entry
-Too many commas in name 1 of "van Boekel, M.A.J.S., Stein, A. and van Bruggen, A.H.C." for entry vanboekel
-while executing---line 1049 of file plain.bst
-Too many commas in name 1 of "van Boekel, M.A.J.S., Stein, A. and van Bruggen, A.H.C." for entry vanboekel
-while executing---line 1090 of file plain.bst
-(There were 6 error messages)
+This is BibTeX, Version 0.99d (TeX Live 2010)
+Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
+The top-level auxiliary file: P2 Proposal.aux
+The style file: plain.bst
+Database file #1: p2refs.bib
+Too many commas in name 1 of "van Boekel, M.A.J.S., Stein, A. and van Bruggen, A.H.C." for entry vanboekel
+while executing---line 1049 of file plain.bst
+Too many commas in name 1 of "van Boekel, M.A.J.S., Stein, A. and van Bruggen, A.H.C." for entry vanboekel
+while executing---line 1090 of file plain.bst
+You've used 6 entries,
+ 2118 wiz_defined-function locations,
+ 529 strings with 4926 characters,
+and the built_in function-call counts, 1457 in all, are:
+= -- 138
+> -- 71
+< -- 0
++ -- 29
+- -- 22
+* -- 72
+:= -- 272
+add.period$ -- 19
+call.type$ -- 6
+change.case$ -- 29
+chr.to.int$ -- 0
+cite$ -- 6
+duplicate$ -- 59
+empty$ -- 113
+format.name$ -- 22
+if$ -- 295
+int.to.chr$ -- 0
+int.to.str$ -- 6
+missing$ -- 6
+newline$ -- 34
+num.names$ -- 12
+pop$ -- 34
+preamble$ -- 1
+purify$ -- 23
+quote$ -- 0
+skip$ -- 44
+stack$ -- 0
+substring$ -- 31
+swap$ -- 6
+text.length$ -- 0
+text.prefix$ -- 0
+top$ -- 0
+type$ -- 22
+warning$ -- 0
+while$ -- 12
+width$ -- 7
+write$ -- 66
+(There were 2 error messages)
diff --git a/writeup/P2 Proposal.log b/writeup/P2 Proposal.log
index 08d34cd..561d382 100644
--- a/writeup/P2 Proposal.log
+++ b/writeup/P2 Proposal.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.11) 12 MAR 2012 22:10
+This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.11) 13 MAR 2012 07:08
entering extended mode
**D:/workspace/cs6601p2/writeup/P2*Proposal.tex
("D:/workspace/cs6601p2/writeup/P2 Proposal.tex"
@@ -46,13 +46,41 @@ Package: titlesec 2011/12/15 v2.10.0 Sectioning titles
\titlewidthlast=\dimen106
\titlewidthfirst=\dimen107
)
-("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\geometry\geometry.sty"
+Package: geometry 2010/09/12 v5.6 Page Geometry
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks15
)
+("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.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)
@@ -73,10 +101,10 @@ 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=\count87
+\Gread@gobject=\count90
))
-\Gin@req@height=\dimen108
-\Gin@req@width=\dimen109
+\Gin@req@height=\dimen116
+\Gin@req@width=\dimen117
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"
Package: amsmath 2000/07/18 v2.13 AMS math features
@@ -88,51 +116,51 @@ Package: amstext 2000/06/29 v2.01
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"
File: amsgen.sty 1999/11/30 v2.0
-\@emptytoks=\toks16
-\ex@=\dimen110
+\@emptytoks=\toks17
+\ex@=\dimen118
))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty"
Package: amsbsy 1999/11/29 v1.2d
-\pmbraise@=\dimen111
+\pmbraise@=\dimen119
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"
Package: amsopn 1999/12/14 v2.01 operator names
)
-\inf@bad=\count88
+\inf@bad=\count91
LaTeX Info: Redefining \frac on input line 211.
-\uproot@=\count89
-\leftroot@=\count90
+\uproot@=\count92
+\leftroot@=\count93
LaTeX Info: Redefining \overline on input line 307.
-\classnum@=\count91
-\DOTSCASE@=\count92
+\classnum@=\count94
+\DOTSCASE@=\count95
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
+\big@size=\dimen120
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
+\macc@depth=\count96
+\c@MaxMatrixCols=\count97
\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
+\c@parentequation=\count98
+\dspbrk@lvl=\count99
+\tag@help=\toks18
+\row@=\count100
+\column@=\count101
+\maxfields@=\count102
+\andhelp@=\toks19
+\eqnshift@=\dimen121
+\alignsep@=\dimen122
+\tagshift@=\dimen123
+\tagwidth@=\dimen124
+\totwidth@=\dimen125
+\lineht@=\dimen126
+\@envbody=\toks20
\multlinegap=\skip48
\multlinetaggap=\skip49
-\mathdisplay@stack=\toks20
+\mathdisplay@stack=\toks21
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
@@ -154,50 +182,94 @@ LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
+*geometry* driver: auto-detecting
+*geometry* detected driver: pdftex
+*geometry* verbose mode - [ preamble ] result:
+* driver: pdftex
+* paper:
+* layout:
+* layoutoffset:(h,v)=(0.0pt,0.0pt)
+* modes:
+* h-part:(L,W,R)=(50.58878pt, 513.11745pt, 50.58878pt)
+* v-part:(T,H,B)=(50.58878pt, 693.79243pt, 50.58878pt)
+* \paperwidth=614.295pt
+* \paperheight=794.96999pt
+* \textwidth=513.11745pt
+* \textheight=693.79243pt
+* \oddsidemargin=-21.68121pt
+* \evensidemargin=-21.68121pt
+* \topmargin=-21.68121pt
+* \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).]
-\scratchcounter=\count100
-\scratchdimen=\dimen119
+\scratchcounter=\count103
+\scratchdimen=\dimen127
\scratchbox=\box29
-\nofMPsegments=\count101
-\nofMParguments=\count102
-\everyMPshowfont=\toks21
-\MPscratchCnt=\count103
-\MPscratchDim=\dimen120
-\MPnumerator=\count104
-\makeMPintoPDFobject=\count105
-\everyMPtoPDFconversion=\toks22
+\nofMPsegments=\count104
+\nofMParguments=\count105
+\everyMPshowfont=\toks22
+\MPscratchCnt=\count106
+\MPscratchDim=\dimen128
+\MPnumerator=\count107
+\makeMPintoPDFobject=\count108
+\everyMPtoPDFconversion=\toks23
)
-Underfull \hbox (badness 4254) in paragraph at lines 67--70
-[] \OT1/cmr/bx/n/10 Data ac-cui-si-tion \OT1/cmr/m/n/10 We first ac-cu-mu-lated
+Underfull \hbox (badness 8094) in paragraph at lines 89--94
+[] \OT1/cmr/bx/n/10 Data ac-qui-si-tion \OT1/cmr/m/n/10 We first ac-cu-mu-lated
a di-
[]
-
-File: bayes.png Graphic file (type png)
-