-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
sequential_prediction_tikz.tex
43 lines (40 loc) · 1.42 KB
/
sequential_prediction_tikz.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\documentclass[tikz, border=2pt]{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=5mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=7mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}
\node[latent] (w0) {$w_0$};
\node[latent, right= 1.5 of w0](w1){$w_1$};
\node[latent, right= 2.95 of w1](w2){$w_2$};
\node[obs, below = 1.5 of w1](y1){${y_1}$};
\node[rect, left = 1.5 of y1](y1hat){$\hat{y_1}$};
\node[obs, below = 0.75 of y1](x1){${x_1}$};
\node[latent, below = 0.75 of x1](phi1){${\phi_1}$};
\node[rect, right = 0.75 of y1](y2hat){$\hat{y_2}$};
\node[obs, right = 1.5 of y2hat](y2){$y_2$};
\node[obs, below = 0.75 of y2](x2){$x_2$};
\node[latent, below = 0.75 of x2](phi2){${\phi_2}$};
\node[diam, above right = 0.75 of y1hat](l1){$L_1$};
\node[diam, above right = 0.75 of y2hat](l2){$L_2$};
\edge {w0}{w1};
\edge {w1}{w2, y1};
\edge {x1}{y1hat, y1};
\edge {x2}{y2hat};
\edge {y2}{x2};
\edge {phi1}{x1};
\edge{y1hat,y1}{l1};
\edge{y2hat,y2}{l2};
\edge{phi1}{phi2};
\node[emptynode, right= of w2](empty1){$\cdots$};
\node[emptynode, right= of phi2](empty2){$\cdots$};
\edge {w2}{y2, empty1};
\edge {phi2}{x2, empty2};
\end{tikzpicture}
\end{document}