From: Mart Lubbers Date: Sun, 21 Dec 2014 13:24:11 +0000 (+0100) Subject: update bayesian network X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=64f84a3e6cb4a017dfaeed6b92d8721b422f9dba;p=ker2014-2.git update bayesian network --- diff --git a/report/.gitignore b/report/.gitignore index 4e73ed6..7f35862 100644 --- a/report/.gitignore +++ b/report/.gitignore @@ -4,3 +4,4 @@ *.pdf *.pyg *.toc +*.eps diff --git a/report/Makefile b/report/Makefile index 1c0358a..801528a 100644 --- a/report/Makefile +++ b/report/Makefile @@ -1,12 +1,15 @@ SHELL:=/bin/bash -all: +all: graphs latex -shell-escape report.tex latex -shell-escape report.tex dvipdfm report.dvi +graphs: + dot -Teps d1.dot > d1.eps + clean: - rm -vf report.{aux,dvi,log,pyg,toc} + rm -vf report.{aux,dvi,log,pyg,toc,eps} clobber: clean rm -vf report.pdf diff --git a/report/ass2-1.tex b/report/ass2-1.tex index ea4f9ae..03b3569 100644 --- a/report/ass2-1.tex +++ b/report/ass2-1.tex @@ -1 +1,52 @@ \chapter{Probabilistic representation and reasoning (and burglars)} +\section{Bayesian network and the conditional probability tables} +\begin{figure}[H] + \caption{Bayesian network, visual representation} + \centering + \includegraphics[scale=0.5]{d1.eps} +\end{figure} + +\strut\\ +\begin{tabular}{|l|l|} + \hline + & Burglar\\ + \hline + T & $0.01$\\ + F & $0.99$\\ + \hline +\end{tabular} +\begin{tabular}{|l|l|} + \hline + & Earthquake\\ + \hline + T & $0.01$\\ + F & $0.99$\\ + \hline +\end{tabular}\\ +\begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Alarm}\\ + Burglar & T & F\\ + \hline + T & $0.95$ & $0.05$\\ + F & $0.00$ & $1.00$\\ + \hline +\end{tabular} +\begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Alarm}\\ + Earthquake & T & F\\ + \hline + T & $0.20$ & $0.80$\\ + F & $0.00$ & $1.00$\\ + \hline +\end{tabular} +\begin{tabular}{|l|ll|} + \hline + & \multicolumn{2}{c|}{Holmes}\\ + Earthquake & T & F\\ + \hline + T & $0.9998$ & $0.0002$\\ + F & $0.00$ & $1.00$\\ + \hline +\end{tabular} diff --git a/report/d1.dot b/report/d1.dot new file mode 100644 index 0000000..b7ede71 --- /dev/null +++ b/report/d1.dot @@ -0,0 +1,9 @@ +digraph { + earthquake -> alarm + earthquake -> holmes + burglar -> alarm + + alarm -> watson + alarm -> holmes + watson -> holmes +} diff --git a/report/report.tex b/report/report.tex index bb1b393..2f93c8b 100644 --- a/report/report.tex +++ b/report/report.tex @@ -1,6 +1,9 @@ \documentclass[twoside,a4paper,titlepage]{report} +\usepackage{graphicx} \usepackage{minted} +\usepackage{float} +\usepackage{slashbox} \author{ Lubbers, M\\