]> code.communitydata.science - ml_measurement_error_public.git/commitdiff
refactor example charts
authorNathan TeBlunthuis <nathante@uw.edu>
Fri, 2 Sep 2022 00:52:25 +0000 (17:52 -0700)
committerNathan TeBlunthuis <nathante@uw.edu>
Fri, 2 Sep 2022 00:52:25 +0000 (17:52 -0700)
17 files changed:
.gitmodules [new file with mode: 0644]
charts/.gitignore [new file with mode: 0644]
charts/Makefile [moved from charts/example_3_dag/Makefile with 81% similarity]
charts/example_1_dag.tex [new file with mode: 0644]
charts/example_1_dag/.gitignore [deleted file]
charts/example_1_dag/Makefile [deleted file]
charts/example_1_dag/example_1_dag.tex [deleted file]
charts/example_2_dag.tex [new file with mode: 0644]
charts/example_2_dag/.gitignore [deleted file]
charts/example_2_dag/Makefile [deleted file]
charts/example_2_dag/example_2_dag.tex [deleted file]
charts/example_3_dag.tex [new file with mode: 0644]
charts/example_3_dag/.gitignore [deleted file]
charts/example_3_dag/example_3_dag.tex [deleted file]
charts/example_4_dag.tex [new file with mode: 0644]
charts/example_legend.tex [new file with mode: 0644]
paper [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..f2d69ab
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "paper"]
+       path = paper
+       url = git@github.com:chainsawriot/measure.git
diff --git a/charts/.gitignore b/charts/.gitignore
new file mode 100644 (file)
index 0000000..76c74db
--- /dev/null
@@ -0,0 +1,9 @@
+*.aux
+*.svg
+*.pdf
+*.png
+*.aux
+*.fdb_latexmk
+*.log
+*.fls
+auto/*
similarity index 81%
rename from charts/example_3_dag/Makefile
rename to charts/Makefile
index 4bcb5ad42545378cedabfd01e4751980f7067fab..4288d05deb190b01e72d2f6e59e32cdc2212b2fc 100644 (file)
@@ -6,8 +6,7 @@ all: $(patsubst %.tex,%.svg,$(wildcard *.tex)) $(patsubst %.tex,%.png,$(wildcard
        convert -density 300 -transparent white $< $@
 
 %.svg: %.pdf
-       /usr/bin/inkscape $< --export-plain-svg=$@
-
+       /usr/bin/inkscape $< --export-plain-svg --export-type=svg --export-filename=$@
 
 %.pdf: %.tex 
        latexmk -f -pdf $<
@@ -18,6 +17,7 @@ clean:
        rm -f vc
        rm *.svg
 
+
 viewpdf: all
        evince *.pdf
 
diff --git a/charts/example_1_dag.tex b/charts/example_1_dag.tex
new file mode 100644 (file)
index 0000000..6ef0e4a
--- /dev/null
@@ -0,0 +1,46 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows, }
+
+\begin{document}
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+\begin{tikzpicture}
+
+  \node[observed] (y) {$Y$};
+  \node[unobserved, above=of y] (x) {$X$};
+  \node[observed, left=of x] (w) {$W$};
+
+%  \node[unobserved, above=of w] (k) {$K$};
+  \node[observed,right=of x] (z) {$Z$};
+%   \node[residual,below=of y] (e) {$\varepsilon$};
+%  \node[residual,below=of w] (xi) {$\xi$};
+
+  \draw[->] (z) to (y);
+  \draw[->] (z) -- (x);
+  \draw[->] (x) -- (y);
+  \draw[->] (x) -- (w);
+%  \draw[->] (y) -- (w);
+%  \draw[->] (x) -- (xi);
+ % \draw[->] (w) -- (xi);
+\end{tikzpicture}
+\end{document}
+
diff --git a/charts/example_1_dag/.gitignore b/charts/example_1_dag/.gitignore
deleted file mode 100644 (file)
index 69e1873..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/auto/
-/vc
-/refs-processed.bib
-/*.aux
-/*.bbl
-/*.blg
-/*.log
-/*.out
-/*.pdf
-/*.fdb_latexmk
-/*.fls
-/*.ttt
diff --git a/charts/example_1_dag/Makefile b/charts/example_1_dag/Makefile
deleted file mode 100644 (file)
index 75fef1f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/make
-
-all: $(patsubst %.tex,%.svg,$(wildcard *.tex)) $(patsubst %.tex,%.png,$(wildcard *.tex)) 
-
-%.png: %.pdf
-       convert -density 300 -transparent white $< $@
-
-%.svg: %.pdf
-       /usr/bin/inkscape $< --export-plain-svg=$@
-
-%.pdf: %.tex 
-       latexmk -f -pdf $<
-
-clean: 
-       latexmk -C *.tex
-       rm -f *.tmp
-       rm -f vc
-       rm *.svg
-
-viewpdf: all
-       evince *.pdf
-
-vc:
-       vc-git
-
-pdf: all
-
-.PHONY: clean all
diff --git a/charts/example_1_dag/example_1_dag.tex b/charts/example_1_dag/example_1_dag.tex
deleted file mode 100644 (file)
index ec6cc78..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-\documentclass[12pt]{standalone}
-
-\usepackage{ucs}
-\usepackage[utf8x]{inputenc}
-
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\renewcommand{\rmdefault}{ugm}
-\renewcommand{\sfdefault}{phv}
-\usepackage[garamond]{mathdesign}
-\usepackage{tikz}
-\usetikzlibrary{positioning, shapes, arrows, shadows, }
-
-\begin{document}
-
-\tikzset{>=latex}
-\begin{tikzpicture}[
-  observed/.style={circle, draw},
-  unobserved/.style={draw, circle, fill=gray!40},
-  legend/.style={rectangle, draw},
-  partly observed/.style 2 args={draw, fill=#2, path picture={
-      \fill[#1, sharp corners] (path picture bounding box.south west) -|
-      (path picture bounding box.north east) -- cycle;},
-     circle}
-  ]
-
-
-  \node[observed] (y) {Y};
-%   \node[observed,above=of y, xshift=1cm] (r) {R};
-  \node[partly observed={white}{gray!40}, above=of y] (x) {X};
-  \node[observed, left=of x,xshift=-1] (w) {W};
-  \node[unobserved, above=of w, xshift=1cm] (k) {K};
-  
-  \matrix [draw, below, yshift=-0.2cm, font=\small, align=center, column sep=2\pgflinewidth, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
-    \node[observed,label=right:observed] {}; \\
-    \node[unobserved,label=right:unobserved]{}; \\
-  };
-
-  \draw[->] (x) -- (y);
-  \draw[->] (x) -- (w);
-  \draw[-] (k) -- (x);
-  \draw[->] (k) -- (w);
-
-\end{tikzpicture}
-\end{document}
-
diff --git a/charts/example_2_dag.tex b/charts/example_2_dag.tex
new file mode 100644 (file)
index 0000000..ee22941
--- /dev/null
@@ -0,0 +1,47 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows}
+
+\begin{document}
+
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+\begin{tikzpicture}
+  \node[observed] (y) {$Y$};
+  \node[unobserved, above=of y] (x) {$X$};
+  \node[observed, left=of x] (w) {$W$};
+
+  \node[observed,right=of x] (z) {$Z$};
+
+  \draw[->] (z) to (y);
+  \draw[->] (z) -- (x);
+  \draw[->] (x) -- (y);
+  \draw[->] (x) -- (w);
+
+  \draw[->] (x) to (y);
+
+  \draw[->] (y) -- (w);
+  \draw[->] (y) -- (w);
+
+
+\end{tikzpicture}
+\end{document}
+
diff --git a/charts/example_2_dag/.gitignore b/charts/example_2_dag/.gitignore
deleted file mode 100644 (file)
index 69e1873..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/auto/
-/vc
-/refs-processed.bib
-/*.aux
-/*.bbl
-/*.blg
-/*.log
-/*.out
-/*.pdf
-/*.fdb_latexmk
-/*.fls
-/*.ttt
diff --git a/charts/example_2_dag/Makefile b/charts/example_2_dag/Makefile
deleted file mode 100644 (file)
index 75fef1f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/make
-
-all: $(patsubst %.tex,%.svg,$(wildcard *.tex)) $(patsubst %.tex,%.png,$(wildcard *.tex)) 
-
-%.png: %.pdf
-       convert -density 300 -transparent white $< $@
-
-%.svg: %.pdf
-       /usr/bin/inkscape $< --export-plain-svg=$@
-
-%.pdf: %.tex 
-       latexmk -f -pdf $<
-
-clean: 
-       latexmk -C *.tex
-       rm -f *.tmp
-       rm -f vc
-       rm *.svg
-
-viewpdf: all
-       evince *.pdf
-
-vc:
-       vc-git
-
-pdf: all
-
-.PHONY: clean all
diff --git a/charts/example_2_dag/example_2_dag.tex b/charts/example_2_dag/example_2_dag.tex
deleted file mode 100644 (file)
index 07ec19c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-\documentclass[12pt]{standalone}
-
-\usepackage{ucs}
-\usepackage[utf8x]{inputenc}
-
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\renewcommand{\rmdefault}{ugm}
-\renewcommand{\sfdefault}{phv}
-\usepackage[garamond]{mathdesign}
-\usepackage{tikz}
-\usetikzlibrary{positioning, shapes, arrows, shadows}
-
-\begin{document}
-
-\tikzset{>=latex}
-\begin{tikzpicture}[
-  observed/.style={circle, draw},
-  partly observed/.style 2 args={draw, fill=#2, path picture={
-      \fill[#1, sharp corners] (path picture bounding box.south west) -|
-      (path picture bounding box.north east) -- cycle;},
-     circle},
-    unobserved/.style={draw, circle, fill=gray!40}
-  ]
-
-  \node[observed] (y) {Y};
-  \node[observed,above=of y, xshift=1cm] (r) {R};
-  \node[partly observed={white}{gray!40}, left=of r] (x) {X};
-  \node[observed, left=of x] (w) {W};
-  \node[unobserved, above=of w, xshift=1cm] (k) {K};
-  
-  \matrix [draw, below, yshift=-0.2cm, font=\small, align=center, column sep=2\pgflinewidth, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
-    \node[observed,label=right:observed] {}; \\
-    \node[unobserved,label=right:unobserved]{}; \\
-  };
-
-
-  \draw[->] (r) -- (y);
-  \draw[->] (r) -- (x);
-  \draw[->] (x) -- (y);
-  \draw[->] (x) -- (w);
-  \draw[->] (k) -- (x);
-  \draw[->] (k) -- (w);
-
-\end{tikzpicture}
-\end{document}
-
diff --git a/charts/example_3_dag.tex b/charts/example_3_dag.tex
new file mode 100644 (file)
index 0000000..2d1098d
--- /dev/null
@@ -0,0 +1,42 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows}
+
+\begin{document}
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+
+\begin{tikzpicture}
+  \node[unobserved] (y) {$Y$};
+
+  \node[observed, above=of y] (x) {$X$};
+  \node[observed, left=of x] (w) {$W$};
+
+%  \node[unobserved, above=of w] (k) {$K$};
+  \node[observed,right=of x] (z) {$Z$};
+%   \node[residual,below=of y] (e) {$\varepsilon$};
+  % \node[residual,below=of w] (xi) {$\xi$};
+  \draw[->] (z) to (y);
+  \draw[->] (x) -- (y);
+  \draw[->] (y) -- (w);
+\end{tikzpicture}
+\end{document}
+
diff --git a/charts/example_3_dag/.gitignore b/charts/example_3_dag/.gitignore
deleted file mode 100644 (file)
index 69e1873..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/auto/
-/vc
-/refs-processed.bib
-/*.aux
-/*.bbl
-/*.blg
-/*.log
-/*.out
-/*.pdf
-/*.fdb_latexmk
-/*.fls
-/*.ttt
diff --git a/charts/example_3_dag/example_3_dag.tex b/charts/example_3_dag/example_3_dag.tex
deleted file mode 100644 (file)
index 01f94e1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-\documentclass[12pt]{standalone}
-
-\usepackage{ucs}
-\usepackage[utf8x]{inputenc}
-
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\renewcommand{\rmdefault}{ugm}
-\renewcommand{\sfdefault}{phv}
-\usepackage[garamond]{mathdesign}
-\usepackage{tikz}
-\usetikzlibrary{positioning, shapes, arrows, shadows}
-
-\begin{document}
-
-\tikzset{>=latex}
-\begin{tikzpicture}[
-  observed/.style={circle, draw},
-  partly observed/.style 2 args={draw, fill=#2, path picture={
-      \fill[#1, sharp corners] (path picture bounding box.south west) -|
-      (path picture bounding box.north east) -- cycle;},
-     circle},
-    unobserved/.style={draw, circle, fill=gray!40}
-  ]
-
-  \node[observed] (y) {Y};
-%  \node[observed,above=of y, xshift=1cm] (r) {R};
-  \node[partly observed={white}{gray!40}, above = of y] (x) {X};
-  \node[observed, left=of x] (w) {W};
-  \node[unobserved, above=of w, xshift=1cm] (k) {K};
-  \node[unobserved, right=of k] (u) {U};
-
-%  \draw[->] (r) -- (y);
-%  \draw[->] (r) -- (x);
-  \draw[->] (x) -- (y);
-  \draw[->] (x) -- (w);
-  \draw[->] (x) -- (k);
-  \draw[->] (k) -- (w);
-  \draw[->] (u) to [out=270,in=30] (y);
-  \draw[->] (u) -- (k);
-
-  
-  \matrix [draw, below, yshift=-0.2cm, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
-    \node[observed,label=right:observed] {}; \\
-    \node[unobserved,label=right:unobserved]{}; \\
-  };
-
-
-\end{tikzpicture}
-\end{document}
-
diff --git a/charts/example_4_dag.tex b/charts/example_4_dag.tex
new file mode 100644 (file)
index 0000000..a3413c0
--- /dev/null
@@ -0,0 +1,47 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows}
+
+\begin{document}
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+
+\begin{tikzpicture}
+  \node[unobserved] (y) {$Y$};
+
+  \node[observed={white}{gray!40}, above=of y] (x) {$X$};
+  \node[observed, left=of x] (w) {$W$};
+
+%  \node[unobserved, above=of w] (k) {$K$};
+  \node[observed,right=of x] (z) {$Z$};
+%   \node[residual,below=of y] (e) {$\varepsilon$};
+%   \node[residual,below=of w] (xi) {$\xi$};
+  \draw[->] (x) -- (y);
+%  \draw[->] (x) -- (w);
+  \draw[->] (y) -- (w);
+%  \draw[->] (k) -- (w);
+  \draw[->] (z) -- (y);
+%  \draw[->] (z) -- (k);
+%  \draw[->] (y) -- (xi);
+%  \draw[->] (w) -- (xi);
+\end{tikzpicture}
+\end{document}
+
diff --git a/charts/example_legend.tex b/charts/example_legend.tex
new file mode 100644 (file)
index 0000000..e7f3eec
--- /dev/null
@@ -0,0 +1,35 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows}
+
+\begin{document}
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+
+\begin{tikzpicture}
+  \matrix [draw, below, font=\small, align=center, column sep=2\pgflinewidth, inner sep=0.4em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
+    \node[observed,label=right:observed] {}; \\
+    \node[unobserved,label=right:automatically classified]{}; \\
+    \node[residual,label=right:error term]{}; \\
+  };
+\end{tikzpicture}
+\end{document}
+
diff --git a/paper b/paper
new file mode 160000 (submodule)
index 0000000..b135cac
--- /dev/null
+++ b/paper
@@ -0,0 +1 @@
+Subproject commit b135cac19e336001401d3ad533a12bdceab913ac

Community Data Science Collective || Want to submit a patch?