From: Mart Lubbers Date: Tue, 6 Jan 2015 10:00:36 +0000 (+0100) Subject: hallo' X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=5c232e0aecd71d51f950bab6006b66a75713f0de;p=ker2014-2.git hallo' --- diff --git a/report/.gitignore b/report/.gitignore index 9ee4f69..2101d8a 100644 --- a/report/.gitignore +++ b/report/.gitignore @@ -5,4 +5,5 @@ *.pyg *.toc *.eps +*.out *.synctex.gz diff --git a/report/Makefile b/report/Makefile index 5d2fcdf..ab49026 100644 --- a/report/Makefile +++ b/report/Makefile @@ -9,7 +9,7 @@ graphs: dot -Teps d1.dot > d1.eps clean: - rm -vf *.eps report.{aux,dvi,log,pyg,toc,eps,synctex.gz} + rm -vf *.eps report.{aux,out,dvi,log,pyg,toc,eps,synctex.gz} clobber: clean rm -vf report.pdf diff --git a/report/ass2-1.tex b/report/ass2-1.tex index deaa133..7f2b15f 100644 --- a/report/ass2-1.tex +++ b/report/ass2-1.tex @@ -1,97 +1,106 @@ \chapter{Probabilistic representation and reasoning (and burglars)} -\section{Bayesian network and the conditional probability tables} +\section{Formal description} +In our representation of the model we chose to introduce a \textit{Noisy OR} to +represent the causal independence of \textit{Burglar} and \textit{Earthquake} +on \textit{Alarm}. The visual representation of the network is visible in +Figure~\ref{bnetwork21} + \begin{figure}[H] \caption{Bayesian network, visual representation} + \label{bnetwork21} \centering \includegraphics[scale=0.5]{d1.eps} \end{figure} -We introduced a \textit{Noisy OR} to represent the causal independence of -\textit{Burglar} and \textit{Earthquake} on Alarm. Probabilities for the causes -of the alarm are calculated using days, in practice this means that the -smallest discrete time interval is one day. The calculation for the probability -of a burglar is then calculated with the following formula(taking leap years -into account and assuming a standard gregorian calendar). +As for the probabilities for \textit{Burglar} and \textit{Earthquake} we chose +to calculate them using days the unit. Calculation for the probability of a +\textit{Burglar} event happening at some day is then this(assuming a gregorian +calendar and leap days). $$\frac{1}{365 + 0.25 - 0.01 - 0.0025}=\frac{1}{365.2425}$$ -This gives the following probability distributions\\ -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{Earthquake}\\ - \hline - T & $0.0027$ & $0.9972$ \\ - F & $0.9973$ & $0.0027$\\ - \hline -\end{tabular} -% -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{Burglar}\\ - \hline - T & $0.0027$ & $0.9973$ \\ - F & $0.9973$ & $0.0027$\\ - \hline -\end{tabular} - -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{$I_1$}\\ - Earthquake & T & F\\ - \hline - T & $0.2$ & $0.8$\\ - F & $0$ & $1$\\ - \hline -\end{tabular} -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{$I_2$}\\ - Burglar & T & F\\ - \hline - T & $0.95$ & $0.05$\\ - F & $0$ & $1$\\ - \hline -\end{tabular} -\begin{tabular}{|ll|ll|} - \hline - && \multicolumn{2}{c|}{Alarm}\\ - $I_1$ & $I_2$ & T & F\\ - \hline - T & T & $1$ & $0$\\ - T & F & $1$ & $0$\\ - F & T & $1$ & $0$\\ - F & F & $0$ & $1$\\ - \hline -\end{tabular} +This gives the following probability distributions visible in +Table~\ref{probdist} -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{Watson}\\ - Alarm & T & F\\ - \hline - T & $0.8$ & $0.2$\\ - F & $0.4$ & $0.6$\\ - \hline -\end{tabular} -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{Gibbons}\\ - Alarm & T & F\\ - \hline - T & $0.99$ & $0.01$\\ - F & $0.04$ & $0.96$\\ - \hline -\end{tabular} -\begin{tabular}{|l|ll|} - \hline - & \multicolumn{2}{c|}{Radio}\\ - Earthquake & T & F\\ - \hline - T & $0.9998$ & $0.0002$\\ - F & $0.0002$ & $0.9998$\\ - \hline -\end{tabular} +\begin{table}[H] + \label{probdist} + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Earthquake}\\ + \hline + T & $0.0027$ & $0.9972$ \\ + F & $0.9973$ & $0.0027$\\ + \hline + \end{tabular} + % + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Burglar}\\ + \hline + T & $0.0027$ & $0.9973$ \\ + F & $0.9973$ & $0.0027$\\ + \hline + \end{tabular} + + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{$I_1$}\\ + Earthquake & T & F\\ + \hline + T & $0.2$ & $0.8$\\ + F & $0$ & $1$\\ + \hline + \end{tabular} + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{$I_2$}\\ + Burglar & T & F\\ + \hline + T & $0.95$ & $0.05$\\ + F & $0$ & $1$\\ + \hline + \end{tabular} + \begin{tabular}{|ll|ll|} + \hline + && \multicolumn{2}{c|}{Alarm}\\ + $I_1$ & $I_2$ & T & F\\ + \hline + T & T & $1$ & $0$\\ + T & F & $1$ & $0$\\ + F & T & $1$ & $0$\\ + F & F & $0$ & $1$\\ + \hline + \end{tabular} + + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Watson}\\ + Alarm & T & F\\ + \hline + T & $0.8$ & $0.2$\\ + F & $0.4$ & $0.6$\\ + \hline + \end{tabular} + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Gibbons}\\ + Alarm & T & F\\ + \hline + T & $0.99$ & $0.01$\\ + F & $0.04$ & $0.96$\\ + \hline + \end{tabular} + \begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Radio}\\ + Earthquake & T & F\\ + \hline + T & $0.9998$ & $0.0002$\\ + F & $0.0002$ & $0.9998$\\ + \hline + \end{tabular} +\end{table} -\paragraph{Implementation}\strut\\ +\section{Implementation} This distribution results in the \textit{AILog} code in Listing~\ref{alarm.ail} \begin{listing} diff --git a/report/report.out b/report/report.out deleted file mode 100644 index 00945ba..0000000 --- a/report/report.out +++ /dev/null @@ -1,3 +0,0 @@ -\BOOKMARK [0][-]{chapter.1}{Probabilistic representation and reasoning \(and burglars\)}{}% 1 -\BOOKMARK [1][-]{section.1.1}{Bayesian network and the conditional probability tables}{chapter.1}% 2 -\BOOKMARK [0][-]{chapter.2}{Visual representations and reasoning}{}% 3