You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.6 KiB

\documentclass[beamer,tikz,crop]{standalone}
\input{preamble/tikz_standalone.tex}
\input{preamble/tikz_common.tex}
\input{preamble/tikz_style.tex}
\input{preamble/tikz_colors.tex}
\input{../abbreviations.tex}
\begin{document}
\begin{tikzpicture}[
x=2.5em, y=4.25ex,
]
\def\datapath{\figurepath/data}
\tikzstyle{tiny random variable} = [random variable, inner sep=0pt, minimum size=13pt, font=\tiny]
\node[tiny random variable, observed] (Xn) at (1, 0) {$\rv{x_n}$};
\node[tiny random variable, observed] (yn) at (1, -3) {$\rv{y_n}$};
\node[tiny random variable, latent] (fnm) at (0, -1) {$\rv{f_n^{\pix{k}}}$};
\node[tiny random variable, latent] (ynm) at (0, -2) {$\rv{y_n^{\pix{k}}}$};
\node[tiny random variable, latent] (alphanm) at (2, -1) {$\rv{\alpha_n^{\pix{k}}}$};
\node[tiny random variable, latent] (an) at (2, -3) {$\rv{a_n}$};
\draw[edge, directed] (Xn) -| (fnm);
\draw[edge, directed] (Xn) -| (alphanm);
\draw[edge, directed] (fnm) -- (ynm);
\draw[edge, directed] (alphanm) -- (an);
\draw[edge, directed] (ynm) |- (yn);
\draw[edge, directed] (an) -- (yn);
% ---
\begin{scope}[on background layer]
\node[
% yshift=3pt,
plate, inner sep=3pt,
opacity=0.3,
fit=(fnm)(alphanm)(ynm),
label={[font=\small, opacity=0.3, anchor=south east]south east:K}
] {};
\end{scope}
% ---
\begin{axis}[
at={($(alphanm) + (25pt, 0)$)},
anchor=west,
result plot,
width=.25\plottextwidth,
height=.25\plottextwidth,
ylabel=,
yticklabels={,,},
xlabel=,
xticklabels={,,},
colormap/YlGn,
point meta min=0.,
point meta max=1.,
name=falldown_probabilities,
]
\addplot[
surf,
mesh/rows=35,
mesh/cols=35,
point meta={\thisrow{a1}},
] table[
ignore chars={\#}, col sep=space, x=Y, y=X,
] {\datapath/falldown_probabilities.dat};
\end{axis}
\begin{scope}[on background layer]
% NOTE(mrksr): See https://tex.stackexchange.com/a/82282
\node[
fit=(falldown_probabilities),
inner xsep=5pt, inner ysep=5pt,
] (fzoom) {};
\draw [very thick, dashed, sStoneLight, fill=sStone]
(alphanm.east) --
(fzoom.north west) --
(fzoom.north east) --
(fzoom.south east) --
(fzoom.south west) --
(alphanm.east) -- cycle
;
\end{scope}
% ---
% NOTE(mrksr): Hacky fix for tikzpicture in block
\node at (0, 0.5) {};
\end{tikzpicture}
\end{document}