update bayesian network
authorMart Lubbers <mart@martlubbers.net>
Sun, 21 Dec 2014 13:24:11 +0000 (14:24 +0100)
committerMart Lubbers <mart@martlubbers.net>
Sun, 21 Dec 2014 13:24:11 +0000 (14:24 +0100)
report/.gitignore
report/Makefile
report/ass2-1.tex
report/d1.dot [new file with mode: 0644]
report/report.tex

index 4e73ed6..7f35862 100644 (file)
@@ -4,3 +4,4 @@
 *.pdf
 *.pyg
 *.toc
+*.eps
index 1c0358a..801528a 100644 (file)
@@ -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
index ea4f9ae..03b3569 100644 (file)
@@ -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 (file)
index 0000000..b7ede71
--- /dev/null
@@ -0,0 +1,9 @@
+digraph {
+       earthquake -> alarm
+       earthquake -> holmes
+       burglar -> alarm
+
+       alarm -> watson
+       alarm -> holmes
+       watson -> holmes
+}
index bb1b393..2f93c8b 100644 (file)
@@ -1,6 +1,9 @@
 \documentclass[twoside,a4paper,titlepage]{report}
 
+\usepackage{graphicx}
 \usepackage{minted}
+\usepackage{float}
+\usepackage{slashbox}
 
 \author{
        Lubbers, M\\