From a1f405be6f09ed7651abc4f0b3f27d55ff1ca4dd Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 3 Feb 2015 22:40:16 +0100 Subject: [PATCH] queries --- report/ass2-2.tex | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/report/ass2-2.tex b/report/ass2-2.tex index f05024c..e705d45 100644 --- a/report/ass2-2.tex +++ b/report/ass2-2.tex @@ -108,7 +108,39 @@ image} We do not only want to know what the probability for a specific pizza is but also the most likely pizza so that we can give an educated guess about the pizza type present on the image processed. This can be done with the following -queries: - +queries using the \texttt{whatpizza} predicate. The \texttt{whatpizza} +predicate is a predicate that is a disjunction of all pizza types. In the +following queries, when the possible explanations, are given we can query for +every possible explanations to find out how the most likely world looks like: +\begin{minted}[fontsize=\footnotesize]{prolog} +ailog: predict whatpizza. +Answer: P(whatpizza|Obs)=[0.19251740120000002,0.19278577620000004]. + [ok,more,explanations,worlds,help]: explanations. + 0: ass([],[basilicumcircle,circle,doublecircle,doublecircleOlives,noObserveError],9.5e-6) + 1: ass([],[circle,doublecircle,doublecircleJalapenos,noObserveError,salamicircle],1.9e-5) + 2: ass([],[blob,blobHam,blobMushrooms,circle,funghiham,noObserveError],3.3249999999999995e-6) + 3: ass([],[basilicumcircle,circle,noObserveError,salamibasilicum,salamicircle],7.6e-5) + 4: ass([],[basilicumcircle,circle,noObserveError],0.0019) + 5: ass([],[blob,blobBasilicum,circle,noObserveError],9.5e-6) + [ok,more,how i,help]: how 4. + whatpizza <- + 1: p_margarita + How? [Number,up,retry,ok,prompt,help]: up. +Answer: P(whatpizza|Obs)=[0.19251740120000002,0.19278577620000004]. + [ok,more,explanations,worlds,help]: ok. +ailog: observe blob. +Answer: P(blob|Obs)=0.01. + [ok,more,explanations,worlds,help]: ok. +ailog: predict whatpizza. +Answer: P(whatpizza|Obs)=[0.28994000000000003,0.33126500000000003]. + [ok,more,explanations,worlds,help]: explanations. + 0: ass([],[blob,blobHam,blobMushrooms,circle,funghiham,noObserveError],3.3249999999999995e-6) + 1: ass([],[basilicumcircle,blob,circle,noObserveError],1.9e-5) + 2: ass([],[blob,blobBasilicum,circle,noObserveError],9.5e-6) + [ok,more,how i,help]: how 0. + whatpizza <- + 1: p_funghi + How? [Number,up,retry,ok,prompt,help]: ok. +\end{minted} \section{Reflections} -- 2.20.1