Skip to content

Commit b4287fb

Browse files
committed
latex files
1 parent 8e6e040 commit b4287fb

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed

images/brain.tex

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
\begin{scope}[shift={(-7.6932,3.5256)}, local bounding box=brain]
2+
\path[draw,line width=0.025cm] (8.162, -2.8955) circle (0.066cm);
3+
\path[draw,line width=0.025cm] (8.0485, -3.2243) circle (0.066cm);
4+
\path[draw,line width=0.025cm] (8.0346, -3.5296) circle (0.066cm);
5+
\path[draw,line width=0.025cm] (8.2166, -3.757) circle (0.066cm);
6+
\path[draw,line width=0.025cm] (7.6556, -3.7827) circle (0.066cm);
7+
\path[draw,line width=0.025cm] (7.6315, -3.5091) circle (0.066cm);
8+
\path[draw,line width=0.025cm] (7.4451, -3.2224) circle (0.066cm);
9+
\path[draw,line width=0.025cm] (7.6247, -2.9461) circle (0.066cm);
10+
11+
\path[draw,line width=0.025cm,miter limit=4.0] (7.6932, -2.6331) -- (7.3637, -2.8234) -- (7.3637, -3.0567) -- (7.1749, -3.1656) -- (7.1749, -3.5256) -- (7.3341, -3.6175) -- (7.3341, -3.8517) -- (7.6883, -4.0562) -- (7.868, -3.9669) -- (8.0478, -4.0562) -- (8.4019, -3.8517) -- (8.4019, -3.6175) -- (8.5611, -3.5256) -- (8.5611, -3.1656) -- (8.3724, -3.0567) -- (8.3724, -2.8234) -- (8.0429, -2.6331) -- (7.868, -2.7341) -- cycle;
12+
\path[draw,line width=0.025cm,miter limit=4.0] (7.868, -3.9669) -- (7.868, -2.7341);
13+
\path[draw,line width=0.025cm] (7.5588, -2.9461) -- (7.3637, -2.9461);
14+
\path[draw,line width=0.025cm] (7.4451, -3.1565) -- (7.4451, -2.9461);
15+
\path[draw,line width=0.025cm] (7.6316, -3.4431) -- (7.6316, -3.2116) -- (7.868, -3.2116);
16+
\path[draw,line width=0.025cm] (7.5897, -3.7827) -- (7.4177, -3.7827) -- (7.4177, -3.523) -- (7.1749, -3.523);
17+
\path[draw,line width=0.025cm] (8.162, -2.9614) -- (8.162, -3.0534) -- (7.868, -3.0534);
18+
\path[draw,line width=0.025cm] (8.0485, -3.1584) -- (8.0485, -3.0534);
19+
\path[draw,line width=0.025cm] (8.1005, -3.5296) -- (8.313, -3.5296) -- (8.313, -3.3442) -- (8.5611, -3.3442);
20+
\path[draw,line width=0.025cm] (8.1507, -3.757) -- (8.0477, -3.757) -- (8.0477, -4.0561);
21+
\end{scope}

images/workflow.tex

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
\documentclass{standalone}
2+
3+
\usepackage{tikz}
4+
\usetikzlibrary{arrows,positioning,shapes,calc,fit,overlay-beamer-styles}
5+
6+
\usepackage{dsfont,pifont}
7+
\newcommand*{\expe}{\mathds{E}}
8+
\usepackage{amsmath}
9+
\usepackage{booktabs}
10+
\usepackage[default]{FiraSans}
11+
12+
\begin{document}
13+
14+
\tikzset{
15+
node/.style={circle, draw, minimum size=3ex, inner sep=0.2},
16+
edge/.style={->,> = latex'},
17+
}
18+
19+
\newcommand{\cmark}{\ding{51}}%
20+
\newcommand{\xmark}{\ding{55}}%
21+
22+
\begin{tikzpicture}
23+
\scriptsize
24+
25+
\begin{scope}[name prefix=scenario-, local bounding box=specification]
26+
% Causal DAG
27+
\begin{scope}[name prefix=dag-]
28+
\node[node] (x1) at (0,0) {$X_2$};
29+
\node[node] (x2) at (0,1) {$X_1$};
30+
\node[node] (i) at (0.5,0.5) {$I$};
31+
\node[node] (y1) at (1.2,0) {$Y_1$};
32+
\node[node] (y2) at (1.2,0.5) {$Y_2$};
33+
\node[node] (y3) at (1.2,1) {$Y_3$};
34+
35+
\draw[edge] (x1) to (i);
36+
\draw[edge] (x2) to (i);
37+
\draw[edge] (i) to (y1);
38+
\draw[edge] (i) to (y2);
39+
\draw[edge] (i) to (y3);
40+
\draw[edge] (x1) to (y1);
41+
\draw[edge] (x2) to (y3);
42+
\node[draw=none, rectangle] (nodes) [fit=(x1) (x2) (y1) (y2) (y3) (i)] {};
43+
\node[draw=none, rectangle, anchor=south] (title) at (nodes.north) {Causal DAG};
44+
\end{scope}
45+
\node[draw, rectangle] (dag) [fit=(dag-nodes) (dag-title)] {};
46+
47+
\begin{scope}[name prefix=scenario-, shift={($(dag.east |- dag-title.north)+(0.3, 0)$)}, anchor=north west]
48+
\node[draw=none, rectangle] (title) at (0, 0) {Modelling Scenario};
49+
\node[anchor=north] (constraints) at (title.south) {$\{ x_1 < 5, x_2 = \text{``UK''} \}$};
50+
\end{scope}
51+
\node[draw, rectangle] (scenario) [fit=(scenario-title) (scenario-constraints)] {};
52+
53+
\node[draw=none, rectangle] (scenario) [fit=(dag) (scenario)] {};
54+
\node[draw=none, rectangle, anchor=south] (title) at (scenario.north) {Causal Specification};
55+
\end{scope}
56+
\node[draw, rectangle] [fit=(scenario-scenario) (scenario-title)] {};
57+
58+
\begin{scope}[name prefix=test-, local bounding box=test-case, shift={($(specification.south)+(0, -1)$)}]
59+
\node[draw=none, rectangle, anchor=north] (title) at (0, 0) {Causal Test Case};
60+
\node[anchor=north] (tuple) at (title.south) {$(X=i, \Delta=\text{increase}, Y=y_1)$};
61+
\coordinate (left) at (scenario-scenario.east |- {(0, 0)});
62+
\coordinate (right) at (scenario-scenario.west |- {(0, 0)});
63+
\node[draw, rectangle] [fit=(title) (tuple) (left) (right)] {};
64+
\end{scope}
65+
66+
\begin{scope}[name prefix=data-, local bounding box=test-data, shift={($(test-case.south)+(0, -1)$)}]
67+
\node[draw=none, rectangle, anchor=north] (title) at (0, 0) {Test Data};
68+
\node[anchor=north] (table) at (title.south) {
69+
\begin{tabular}{rrrrrr}
70+
\toprule
71+
$X_1$ & $X_2$ & $I$ & $Y_1$ & $Y_2$ & $Y_3$ \\
72+
\midrule
73+
1.2 & ``UK'' & 0.3 & 7.8 & 4 & 100 \\
74+
3.2 & ``UK'' & 0.1 & 7.6 & 8 & 95 \\
75+
\multicolumn{6}{c}{$\vdots$} \\
76+
\bottomrule
77+
\end{tabular}
78+
};
79+
\coordinate (left) at (scenario-scenario.east |- {(0, 0)});
80+
\coordinate (right) at (scenario-scenario.west |- {(0, 0)});
81+
\node[draw, rectangle] [fit=(title) (table) (left) (right)] {};
82+
\end{scope}
83+
84+
\begin{scope}[name prefix=estimand-, local bounding box=estimand, anchor=south, shift={($(test-case.east |- test-tuple.south) + (1, 0)$)}]
85+
\node[anchor=south west] (eqn) at (0,0) {
86+
$\Delta Y=\expe{[I=0 | X_1]} - \expe{[I=1 | X_1]} $
87+
};
88+
\node[draw=none, rectangle, anchor=south] (title) at (eqn.north) {Statistical Estimand};
89+
\node[draw, rectangle] [fit=(estimand-title) (estimand-eqn)] {};
90+
\end{scope}
91+
92+
\begin{scope}[name prefix=estimate-, local bounding box=estimate, shift={($(estimand.east)+(1, 0)$)}]
93+
\node[draw=none, rectangle, anchor=south west] (title) at (0, 0) {Causal Estimate};
94+
\node[anchor=north] (table) at (title.south) {
95+
$\Delta Y=5$
96+
};
97+
\coordinate (top) at ({(0, 0)} |- test-title.north);
98+
\coordinate (bot) at ({(0, 0)} |- estimand-eqn.south);
99+
\node[draw, rectangle] [fit=(title) (table) (top) (bot)] {};
100+
\end{scope}
101+
102+
\begin{scope}[name prefix=oracle-, local bounding box=test-oracle, shift={($(estimate.east) + (1.75, -0.2)$)}]
103+
\begin{scope}[shift={(0,0)}, local bounding box=brain, scale=1.2]
104+
\input{brain}
105+
\end{scope}
106+
\node[draw=none, rectangle, anchor=south] (title) at (brain.north) {Test Oracle};
107+
108+
\node[draw, rectangle] [fit=(title) (brain)] {};
109+
\end{scope}
110+
111+
\begin{scope}[name prefix=outcome-, local bounding box=test-outcome, shift={($(brain.east |- estimate.east) + (1, 0)$)}]
112+
\node[draw=none, rectangle, anchor=south west] (title) at (0,0) {Test Outcomes};
113+
\node[draw=none, anchor=north] (ok) at (title.south) {\cmark ~ \xmark};
114+
115+
\coordinate (top) at ({(0, 0)} |- test-title.north);
116+
\coordinate (bot) at ({(0, 0)} |- estimand-eqn.south);
117+
\node[draw, rectangle] (test-outcome) [fit=(outcome-title) (outcome-ok) (top) (bot)] {};
118+
\end{scope}
119+
120+
\draw[edge, dashed] ($(specification.east) + (0.1, 0)$) -- (estimand.north |- specification.east) -- (estimand.north);
121+
\draw[edge, dashed] (test-case) -- (estimand);
122+
123+
\draw[edge, dashed] ($(test-data.east) + (0.1, 0)$) -- (estimate.south |- test-data.east) -- (estimate.south);
124+
\draw[edge, dashed] (estimand) -- (estimate);
125+
126+
\draw[edge, dashed] (estimate) -- (test-oracle.west |- estimate);
127+
\draw[edge, dashed] (test-oracle.east |- test-outcome) -- (test-outcome);
128+
\end{tikzpicture}
129+
130+
131+
\end{document}

0 commit comments

Comments
 (0)