Skip to content

Commit

Permalink
new images
Browse files Browse the repository at this point in the history
  • Loading branch information
murphyk committed Dec 1, 2023
1 parent f04ac17 commit 265c134
Show file tree
Hide file tree
Showing 10 changed files with 684 additions and 195 deletions.
77 changes: 59 additions & 18 deletions notebooks/book1/04/bootstrap_demo_bernoulli.ipynb

Large diffs are not rendered by default.

604 changes: 427 additions & 177 deletions scratchpad.ipynb

Large diffs are not rendered by default.

Binary file added tikz/POMDP_tikz2.pdf
Binary file not shown.
55 changes: 55 additions & 0 deletions tikz/POMDP_tikz2.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
\documentclass[tikz, border=1cm]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}

\begin{document}
% \title{sequential_prediction}
% \author{Dhruv Patel}
% \date{July 2022}
\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}

\node[latent] (s0) {$s_0$};
\node[latent, right= 2.4cm of s0](s1){$s_1$};
\node[latent, right= 2.4cm of s1](s2){$s_2$};

\node[obs, below= 2cm of s0](x0){$x_0$};
\node[obs, below= 2cm of s1](x1){$x_1$};
\node[obs, below= 2cm of s2](x2){$x_2$};

\node[latent, below= 1cm of x0](b0){$b_0$};
\node[latent, below= 1cm of x1](b1){$b_1$};
\node[latent, below= 1cm of x2](b2){$b_2$};

\node[rect, right = 0.8cm of x0](a0){$a_0$};
\node[rect, right = 0.8cm of x1](a1){$a_1$};

\node[diam, above = 0.6 of a0](r0){$r_0$};
\node[diam, above = 0.6 of a1](r1){$r_1$};

\node[emptynode, right= 2cm of s2](e1){$\cdots$};
\node[emptynode, right= 2cm of b2](e2){$\cdots$};

\edge{s0}{x0,s1,r0};
\edge{x0}{b0};
\edge{b0}{b1,a0};
\edge{b1}{b2};
\edge{a0}{r0,s1};
\edge{s1}{r1, x1, s2};
\edge{b1}{b2, a1};
\edge{s2}{x2};
\edge{x2,r1,a1}{b2};
\edge{a1}{r1,s2};
\edge{a0,r0,x1}{b1};
\edge{s2}{e1};
\edge{b2}{e2};
\node[draw=black,thin,fit=(s0)(s1)(s2), rectangle,inner sep=10pt](rect1) {};
\node[const, above = 2.9cm of a1](){environment};
\node[draw=black,thin,fit=(b0)(b1)(b2), rectangle,inner sep=10pt](rect1) {};
\node[const, below = 1.9cm of a1](){agent};

\end{tikzpicture}
\end{document}
Binary file added tikz/bandits2.pdf
Binary file not shown.
55 changes: 55 additions & 0 deletions tikz/bandits2.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
\documentclass[tikz, border=1cm]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}

\begin{document}
% \title{sequential_prediction}
% \author{Dhruv Patel}
% \date{July 2022}
\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}

\node[obs] (s0) {$s_0$};
\node[obs, right= 2.4cm of s0](s1){$s_1$};
\node[obs, right= 2.4cm of s1](s2){$s_2$};

\node[emptynode, below= 2cm of s0](x0){};
\node[emptynode, below= 2cm of s1](x1){};
\node[emptynode, below= 2cm of s2](x2){};

\node[latent, below= 3cm of s0](b0){$b_0$};
\node[latent, below= 3cm of s1](b1){$b_1$};
\node[latent, below= 3cm of s2](b2){$b_2$};

\node[rect, ,right = 0.8cm of x0](a0){$a_0$};
\node[rect, right = 0.8cm of x1](a1){$a_1$};

\node[diam, above = 0.6 of a0](r0){$r_0$};
\node[diam, above = 0.6 of a1](r1){$r_1$};

%\node[emptynode, right= 2cm of s2](e1){$\cdots$};
%\node[emptynode, right= 2cm of b2](e2){$\cdots$};

\edge{s0}{b0,r0};
\edge{b0}{b1,a0};
\edge{b1}{b2};
\edge{a0}{r0};
\edge{s1}{r1,b1};
\edge{b1}{b2, a1};
\edge{s2}{b2};
\edge{r1,a1}{b2};
\edge{a1}{r1};
\edge{a0,r0}{b1};

%\edge{s2}{e1};
%\edge{b2}{e2};
\node[draw=black,thin,fit=(s0)(s1)(s2), rectangle,inner sep=10pt](rect1) {};
% \node[const, above = 2.9cm of a1](){environment};
\node[draw=black,thin,fit=(b0)(b1)(b2), rectangle,inner sep=10pt](rect1) {};
% \node[const, below = 1.9cm of a1](){agent};

\end{tikzpicture}
\end{document}
Binary file added tikz/bandits3.pdf
Binary file not shown.
55 changes: 55 additions & 0 deletions tikz/bandits3.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
\documentclass[tikz, border=1cm]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}

\begin{document}
% \title{sequential_prediction}
% \author{Dhruv Patel}
% \date{July 2022}
\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}

\node[latent] (s0) {$s_0$};
\node[latent, right= 2.4cm of s0](s1){$s_1$};
\node[latent, right= 2.4cm of s1](s2){$s_2$};

\node[obs, below= 2cm of s0](x0){$s_0$};
\node[obs, below= 2cm of s1](x1){$s_1$};
\node[obs, below= 2cm of s2](x2){$s_2$};

\node[latent, below= 1cm of x0](b0){$b_0$};
\node[latent, below= 1cm of x1](b1){$b_1$};
\node[latent, below= 1cm of x2](b2){$b_2$};

\node[rect, right = 0.8cm of x0](a0){$a_0$};
\node[rect, right = 0.8cm of x1](a1){$a_1$};

\node[diam, above = 0.6 of a0](r0){$r_0$};
\node[diam, above = 0.6 of a1](r1){$r_1$};

\node[emptynode, right= 2cm of s2](e1){$\cdots$};
\node[emptynode, right= 2cm of b2](e2){$\cdots$};

\edge{s0}{x0,r0};
\edge{x0}{b0};
\edge{b0}{b1,a0};
\edge{b1}{b2};
\edge{a0}{r0,s1};
\edge{s1}{r1, x1};
\edge{b1}{b2, a1};
\edge{s2}{x2};
\edge{x2,r1,a1}{b2};
\edge{a1}{r1,s2};
\edge{a0,r0,x1}{b1};
% \edge{s2}{e1};
\edge{b2}{e2};
\node[draw=black,thin,fit=(s0)(s1)(s2), rectangle,inner sep=10pt](rect1) {};
\node[const, above = 2.9cm of a1](){environment};
\node[draw=black,thin,fit=(b0)(b1)(b2), rectangle,inner sep=10pt](rect1) {};
\node[const, below = 1.9cm of a1](){agent};

\end{tikzpicture}
\end{document}
Binary file added tikz/pomdp_prediction.pdf
Binary file not shown.
33 changes: 33 additions & 0 deletions tikz/pomdp_prediction.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
\documentclass[tikz, border=1cm]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}

\begin{document}
% \title{sequential_prediction}
% \author{Dhruv Patel}
% \date{July 2022}
\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}

\node[latent] (s0) {$h=(D,x,y)$};

\node[obs, below= 2cm of s0](x0){$o=(D,x)$};

\node[latent, below= 1cm of x0](b0){$b=p(\theta|D)$};

\node[rect, right = 0.8cm of x0](a0){$a=\hat{y}$};

\node[diam, above = 0.6 of a0](r0){$\ell(y,\hat{y}$};


\edge{s0}{x0, r0};
\edge{x0}{b0};
\edge{b0}{a0};
\edge{a0}{r0};


\end{tikzpicture}
\end{document}

0 comments on commit 265c134

Please sign in to comment.