Commit 0907b4a8 authored by Lukas Kettenbach's avatar Lukas Kettenbach
Browse files

Presentation DBN

parent 4e8b17fe
......@@ -14,7 +14,7 @@
\subsection{Example}
\begin{frame}
%\frametitle{Example}
\includegraphics[width=.9\textwidth]{figures/dbn}
\includegraphics[width=1\textwidth]{figures/dbn}
\end{frame}
\subsection{Inference}
......@@ -49,4 +49,54 @@
\begin{frame}
\frametitle{Algorithm}
\end{frame}
\ No newline at end of file
\includegraphics[width=1\textwidth]{figures/lwalgsimple}
\end{frame}
\begin{frame}
\frametitle{Algorithm}
\includegraphics[width=1\textwidth]{figures/lwalg}
\end{frame}
\begin{frame}
\frametitle{Algorithm}
\includegraphics[width=.8\textwidth]{figures/pfalg}
\end{frame}
\subsection{Structure}
\begin{frame}
\frametitle{Algorithm}
\includegraphics[width=.8\textwidth]{figures/pfalg_code}
\end{frame}
\begin{frame}
\frametitle{Files}
\Large\textbf{PRIMO/primo/}
\begin{itemize}
\item core/
\begin{itemize}
\item DynamicBayesNet.py
\item TowTBN.py (create\_timeslice())
\end{itemize}
\item reasoning/particlebased/
\begin{itemize}
\item ParticleFilterDBN.py (sample\_from\_inital\_distribution(), wighted\_sample\_with\_replacement(), ...)
\end{itemize}
\item tests/
\begin{itemize}
\item DynamicBayesNet\_test.py
\item XMLBIF\_test.py
\end{itemize}
\item utils/
\begin{itemize}
\item XMLBIF.py
\end{itemize}
\end{itemize}
\end{frame}
\subsection{Literature}
\begin{frame}
\begin{itemize}
\item \textsc{Stuart Russell and Peter Norvig} \\ Artificial Intelligence: A Modern Approach
\item \textsc{Daphne Koller and Nir Friedman} \\ Probabilistic Graphical Models: Principles and Techniques
\end{itemize}
\end{frame}
......@@ -48,28 +48,42 @@
\@writefile{nav}{\headcommand {\beamer@framepages {7}{7}}}
\@writefile{nav}{\headcommand {\slideentry {2}{3}{3}{8/8}{Inference}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {8}{8}}}
\@writefile{toc}{\beamer@sectionintoc {3}{Factor Trees}{9}{0}{3}}
\@writefile{nav}{\headcommand {\sectionentry {3}{Factor Trees}{9}{Factor Trees}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {4}{8}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {6}{8}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{1}{Task Description}{9}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{1}{9}{Task Description}}\headcommand {\beamer@subsectionpages {9}{8}}}
\@writefile{nav}{\headcommand {\slideentry {3}{1}{1}{9/9}{Task Description}{0}}}
\@writefile{nav}{\headcommand {\slideentry {2}{3}{4}{9/9}{Inference}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {9}{9}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{2}{Factor Elimination}{10}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{2}{10}{Factor Elimination}}\headcommand {\beamer@subsectionpages {9}{9}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{3}{Elimination Trees}{10}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{3}{10}{Elimination Trees}}\headcommand {\beamer@subsectionpages {10}{9}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{4}{Building Strategies}{10}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{4}{10}{Building Strategies}}\headcommand {\beamer@subsectionpages {10}{9}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{5}{Literature}{10}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{5}{10}{Literature}}\headcommand {\beamer@subsectionpages {10}{9}}}
\@writefile{nav}{\headcommand {\slideentry {3}{5}{1}{10/10}{Literature}{0}}}
\@writefile{nav}{\headcommand {\slideentry {2}{3}{5}{10/10}{Inference}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {10}{10}}}
\@writefile{nav}{\headcommand {\slideentry {3}{5}{2}{11/11}{Literature}{0}}}
\@writefile{toc}{\beamer@subsectionintoc {2}{4}{Structure}{11}{0}{2}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{4}{11}{Structure}}\headcommand {\beamer@subsectionpages {6}{10}}}
\@writefile{nav}{\headcommand {\slideentry {2}{4}{1}{11/11}{Structure}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {11}{11}}}
\@writefile{nav}{\headcommand {\beamer@partpages {1}{11}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {12}{11}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {12}{11}}}
\@writefile{nav}{\headcommand {\beamer@documentpages {11}}}
\@writefile{nav}{\headcommand {\def \inserttotalframenumber {11}}}
\@writefile{nav}{\headcommand {\slideentry {2}{4}{2}{12/12}{Structure}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {12}{12}}}
\@writefile{toc}{\beamer@subsectionintoc {2}{5}{Literature}{13}{0}{2}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{5}{13}{Literature}}\headcommand {\beamer@subsectionpages {11}{12}}}
\@writefile{nav}{\headcommand {\slideentry {2}{5}{1}{13/13}{Literature}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {13}{13}}}
\@writefile{toc}{\beamer@sectionintoc {3}{Factor Trees}{14}{0}{3}}
\@writefile{nav}{\headcommand {\sectionentry {3}{Factor Trees}{14}{Factor Trees}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {4}{13}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {13}{13}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{1}{Task Description}{14}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{1}{14}{Task Description}}\headcommand {\beamer@subsectionpages {14}{13}}}
\@writefile{nav}{\headcommand {\slideentry {3}{1}{1}{14/14}{Task Description}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {14}{14}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{2}{Factor Elimination}{15}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{2}{15}{Factor Elimination}}\headcommand {\beamer@subsectionpages {14}{14}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{3}{Elimination Trees}{15}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{3}{15}{Elimination Trees}}\headcommand {\beamer@subsectionpages {15}{14}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{4}{Building Strategies}{15}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{4}{15}{Building Strategies}}\headcommand {\beamer@subsectionpages {15}{14}}}
\@writefile{toc}{\beamer@subsectionintoc {3}{5}{Literature}{15}{0}{3}}
\@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{3}{5}{15}{Literature}}\headcommand {\beamer@subsectionpages {15}{14}}}
\@writefile{nav}{\headcommand {\slideentry {3}{5}{1}{15/15}{Literature}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {15}{15}}}
\@writefile{nav}{\headcommand {\slideentry {3}{5}{2}{16/16}{Literature}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {16}{16}}}
\@writefile{nav}{\headcommand {\beamer@partpages {1}{16}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {17}{16}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {17}{16}}}
\@writefile{nav}{\headcommand {\beamer@documentpages {16}}}
\@writefile{nav}{\headcommand {\def \inserttotalframenumber {16}}}
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2013.4.6) 11 OCT 2013 16:31
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2013.4.6) 11 OCT 2013 18:47
entering extended mode
%&-line parsing enabled.
**primo.tex
......@@ -1247,7 +1247,7 @@ LaTeX Font Info: Font shape `T1/phv/m/it' in size <6> not available
(Font) Font shape `T1/phv/m/sl' tried instead on input line 12.
[4
] <figures/dbn.jpeg, id=176, 434.5836pt x 196.3335pt>
] <figures/dbn.jpeg, id=214, 434.5836pt x 196.3335pt>
File: figures/dbn.jpeg Graphic file (type jpg)
<use figures/dbn.jpeg> [5
......@@ -1256,18 +1256,46 @@ File: figures/dbn.jpeg Graphic file (type jpg)
] [7
] [8
]
<figures/lwalgsimple.jpeg, id=282, 333.8874pt x 193.6836pt>
File: figures/lwalgsimple.jpeg Graphic file (type jpg)
]) (./input/denis.tex <figures/algo10.png, id=246, 1188.44pt x 632.3625pt>
File: figures/algo10.png Graphic file (type png)
<use figures/algo10.png>
<use figures/lwalgsimple.jpeg> [8
<./figures/lwalgsimple.jpeg>]
<figures/lwalg.jpeg, id=305, 329.5512pt x 215.8464pt>
File: figures/lwalg.jpeg Graphic file (type jpg)
<use figures/lwalg.jpeg>
[9
<./figures/algo10.png>] [10
<./figures/lwalg.jpeg>]
<figures/pfalg.jpeg, id=328, 291.0072pt x 221.628pt>
File: figures/pfalg.jpeg Graphic file (type jpg)
<use figures/pfalg.jpeg>
[10
<./figures/pfalg.jpeg>]
<figures/pfalg_code.jpeg, id=351, 291.0072pt x 221.628pt>
File: figures/pfalg_code.jpeg Graphic file (type jpg)
<use figures/pfalg_code.jpeg> [11
<./figures/pfalg_code.jpeg>] [12
] [13
] [11
])
(./input/denis.tex <figures/algo10.png, id=419, 1188.44pt x 632.3625pt>
File: figures/algo10.png Graphic file (type png)
<use figures/algo10.png> [14
<./figures/algo10.png>] [15
]) (./input/manu.tex) (./input/max.tex)
] [16
])
(./input/manu.tex) (./input/max.tex)
\tf@nav=\write6
\openout6 = `primo.nav'.
......@@ -1277,29 +1305,28 @@ File: figures/algo10.png Graphic file (type png)
\tf@snm=\write8
\openout8 = `primo.snm'.
(./primo.aux) )
(./primo.aux) )
Here is how much of TeX's memory you used:
19481 strings out of 495021
369103 string characters out of 1181036
446025 words of memory out of 3000000
22088 multiletter control sequences out of 15000+50000
62241 words of font info for 85 fonts, out of 3000000 for 9000
19532 strings out of 495021
369861 string characters out of 1181036
449025 words of memory out of 3000000
22121 multiletter control sequences out of 15000+50000
67409 words of font info for 87 fonts, out of 3000000 for 9000
28 hyphenation exceptions out of 8191
49i,20n,57p,394b,754s stack positions out of 5000i,500n,10000p,200000b,50000s
{/usr/share/texmf-texlive/fonts/enc/dvips/base/8r.enc}</usr/shar
e/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf-tex
live/fonts/type1/public/amsfonts/cm/cmss10.pfb></usr/share/texmf-texlive/fonts/
type1/public/amsfonts/cm/cmss8.pfb></usr/share/texmf-texlive/fonts/type1/public
/amsfonts/cm/cmsy10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/c
m/cmsy6.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy8.pfb>
</usr/share/texmf-texlive/fonts/type1/urw/courier/ucrr8a.pfb></usr/share/texmf-
texlive/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/share/texmf-texlive/fonts/typ
e1/urw/helvetic/uhvr8a.pfb></usr/share/texmf-texlive/fonts/type1/urw/helvetic/u
hvro8a.pfb>
Output written on primo.pdf (11 pages, 437285 bytes).
{/usr/share/texmf-texlive/fonts/enc/dvips/base/8r.enc}</usr/sha
re/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf-te
xlive/fonts/type1/public/amsfonts/cm/cmss10.pfb></usr/share/texmf-texlive/fonts
/type1/public/amsfonts/cm/cmss8.pfb></usr/share/texmf-texlive/fonts/type1/publi
c/amsfonts/cm/cmsy10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/
cm/cmsy6.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy8.pfb
></usr/share/texmf-texlive/fonts/type1/urw/courier/ucrr8a.pfb></usr/share/texmf
-texlive/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/share/texmf-texlive/fonts/ty
pe1/urw/helvetic/uhvr8a.pfb></usr/share/texmf-texlive/fonts/type1/urw/helvetic/
uhvro8a.pfb>
Output written on primo.pdf (16 pages, 1059268 bytes).
PDF statistics:
342 PDF objects out of 1000 (max. 8388607)
34 named destinations out of 1000 (max. 500000)
191 words of extra memory for PDF output out of 10000 (max. 10000000)
534 PDF objects out of 1000 (max. 8388607)
46 named destinations out of 1000 (max. 500000)
227 words of extra memory for PDF output out of 10000 (max. 10000000)
......@@ -24,22 +24,34 @@
\headcommand {\beamer@framepages {7}{7}}
\headcommand {\slideentry {2}{3}{3}{8/8}{Inference}{0}}
\headcommand {\beamer@framepages {8}{8}}
\headcommand {\sectionentry {3}{Factor Trees}{9}{Factor Trees}{0}}
\headcommand {\beamer@sectionpages {4}{8}}
\headcommand {\beamer@subsectionpages {6}{8}}
\headcommand {\beamer@subsectionentry {0}{3}{1}{9}{Task Description}}\headcommand {\beamer@subsectionpages {9}{8}}
\headcommand {\slideentry {3}{1}{1}{9/9}{Task Description}{0}}
\headcommand {\slideentry {2}{3}{4}{9/9}{Inference}{0}}
\headcommand {\beamer@framepages {9}{9}}
\headcommand {\beamer@subsectionentry {0}{3}{2}{10}{Factor Elimination}}\headcommand {\beamer@subsectionpages {9}{9}}
\headcommand {\beamer@subsectionentry {0}{3}{3}{10}{Elimination Trees}}\headcommand {\beamer@subsectionpages {10}{9}}
\headcommand {\beamer@subsectionentry {0}{3}{4}{10}{Building Strategies}}\headcommand {\beamer@subsectionpages {10}{9}}
\headcommand {\beamer@subsectionentry {0}{3}{5}{10}{Literature}}\headcommand {\beamer@subsectionpages {10}{9}}
\headcommand {\slideentry {3}{5}{1}{10/10}{Literature}{0}}
\headcommand {\slideentry {2}{3}{5}{10/10}{Inference}{0}}
\headcommand {\beamer@framepages {10}{10}}
\headcommand {\slideentry {3}{5}{2}{11/11}{Literature}{0}}
\headcommand {\beamer@subsectionentry {0}{2}{4}{11}{Structure}}\headcommand {\beamer@subsectionpages {6}{10}}
\headcommand {\slideentry {2}{4}{1}{11/11}{Structure}{0}}
\headcommand {\beamer@framepages {11}{11}}
\headcommand {\beamer@partpages {1}{11}}
\headcommand {\beamer@subsectionpages {12}{11}}
\headcommand {\beamer@sectionpages {12}{11}}
\headcommand {\beamer@documentpages {11}}
\headcommand {\def \inserttotalframenumber {11}}
\headcommand {\slideentry {2}{4}{2}{12/12}{Structure}{0}}
\headcommand {\beamer@framepages {12}{12}}
\headcommand {\beamer@subsectionentry {0}{2}{5}{13}{Literature}}\headcommand {\beamer@subsectionpages {11}{12}}
\headcommand {\slideentry {2}{5}{1}{13/13}{Literature}{0}}
\headcommand {\beamer@framepages {13}{13}}
\headcommand {\sectionentry {3}{Factor Trees}{14}{Factor Trees}{0}}
\headcommand {\beamer@sectionpages {4}{13}}
\headcommand {\beamer@subsectionpages {13}{13}}
\headcommand {\beamer@subsectionentry {0}{3}{1}{14}{Task Description}}\headcommand {\beamer@subsectionpages {14}{13}}
\headcommand {\slideentry {3}{1}{1}{14/14}{Task Description}{0}}
\headcommand {\beamer@framepages {14}{14}}
\headcommand {\beamer@subsectionentry {0}{3}{2}{15}{Factor Elimination}}\headcommand {\beamer@subsectionpages {14}{14}}
\headcommand {\beamer@subsectionentry {0}{3}{3}{15}{Elimination Trees}}\headcommand {\beamer@subsectionpages {15}{14}}
\headcommand {\beamer@subsectionentry {0}{3}{4}{15}{Building Strategies}}\headcommand {\beamer@subsectionpages {15}{14}}
\headcommand {\beamer@subsectionentry {0}{3}{5}{15}{Literature}}\headcommand {\beamer@subsectionpages {15}{14}}
\headcommand {\slideentry {3}{5}{1}{15/15}{Literature}{0}}
\headcommand {\beamer@framepages {15}{15}}
\headcommand {\slideentry {3}{5}{2}{16/16}{Literature}{0}}
\headcommand {\beamer@framepages {16}{16}}
\headcommand {\beamer@partpages {1}{16}}
\headcommand {\beamer@subsectionpages {17}{16}}
\headcommand {\beamer@sectionpages {17}{16}}
\headcommand {\beamer@documentpages {16}}
\headcommand {\def \inserttotalframenumber {16}}
......@@ -3,9 +3,11 @@
\BOOKMARK [3][]{Outline0.2.1.4}{Definition}{Outline0.2}
\BOOKMARK [3][]{Outline0.2.2.5}{Example}{Outline0.2}
\BOOKMARK [3][]{Outline0.2.3.6}{Inference}{Outline0.2}
\BOOKMARK [3][]{Outline0.2.4.11}{Structure}{Outline0.2}
\BOOKMARK [3][]{Outline0.2.5.13}{Literature}{Outline0.2}
\BOOKMARK [2][]{Outline0.3}{Factor Trees}{}
\BOOKMARK [3][]{Outline0.3.1.9}{Task Description}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.2.10}{Factor Elimination}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.3.10}{Elimination Trees}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.4.10}{Building Strategies}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.5.10}{Literature}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.1.14}{Task Description}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.2.15}{Factor Elimination}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.3.15}{Elimination Trees}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.4.15}{Building Strategies}{Outline0.3}
\BOOKMARK [3][]{Outline0.3.5.15}{Literature}{Outline0.3}
......@@ -5,9 +5,11 @@
\beamer@subsectionintoc {2}{1}{Definition}{4}{0}{2}
\beamer@subsectionintoc {2}{2}{Example}{5}{0}{2}
\beamer@subsectionintoc {2}{3}{Inference}{6}{0}{2}
\beamer@sectionintoc {3}{Factor Trees}{9}{0}{3}
\beamer@subsectionintoc {3}{1}{Task Description}{9}{0}{3}
\beamer@subsectionintoc {3}{2}{Factor Elimination}{10}{0}{3}
\beamer@subsectionintoc {3}{3}{Elimination Trees}{10}{0}{3}
\beamer@subsectionintoc {3}{4}{Building Strategies}{10}{0}{3}
\beamer@subsectionintoc {3}{5}{Literature}{10}{0}{3}
\beamer@subsectionintoc {2}{4}{Structure}{11}{0}{2}
\beamer@subsectionintoc {2}{5}{Literature}{13}{0}{2}
\beamer@sectionintoc {3}{Factor Trees}{14}{0}{3}
\beamer@subsectionintoc {3}{1}{Task Description}{14}{0}{3}
\beamer@subsectionintoc {3}{2}{Factor Elimination}{15}{0}{3}
\beamer@subsectionintoc {3}{3}{Elimination Trees}{15}{0}{3}
\beamer@subsectionintoc {3}{4}{Building Strategies}{15}{0}{3}
\beamer@subsectionintoc {3}{5}{Literature}{15}{0}{3}
......@@ -76,22 +76,9 @@ def simulate_evidence():
evidence = {door:"True"}
else:
evidence = {door:"False"}
class RobotParticle(pf.Particle):
def __init__(self):
super(pf.Particle, self).__init__()
# set random initial position
self.pos = random.randrange(10)
def update(self):
x_ = x
if x not in self.state:
x_ = x0_init
#print(self.state[x_])
pass
result = pf.particle_filtering_DBN(dbn, N, T, get_evidence_function, RobotParticle, 0)
result = pf.particle_filtering_DBN(dbn, N, T, get_evidence_function)
for samples in result:
w_hit = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
for sample in samples:
......
# -*- coding: utf-8 -*-
import primo.reasoning.GibbsTransitionModel as gtm
def particle_filtering(e, N, dbn):
S = dbn.sample_from_prior_distribution(N)
W = [(1. / N)] * N
print S
for i in xrange(0, N):
print S[i]
S[i] = gtm.transition(dbn, S[i])
print " --------------------------------------------------------------- "
print S
# for i in xrange(1, self.iterations):
# self.particles = gtm.transition(dbn, state)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment