1
0

Merge branch 'master' of code:ml_measurement_error_public

This commit is contained in:
Nathan TeBlunthuis 2022-10-07 10:43:32 -07:00
commit d0c5766bdf
20 changed files with 232 additions and 238 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "paper"]
path = paper
url = git@github.com:chainsawriot/measure.git

9
charts/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
*.aux
*.svg
*.pdf
*.png
*.aux
*.fdb_latexmk
*.log
*.fls
auto/*

View 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

46
charts/example_1_dag.tex Normal file
View File

@ -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}

View File

@ -1,12 +0,0 @@
/auto/
/vc
/refs-processed.bib
/*.aux
/*.bbl
/*.blg
/*.log
/*.out
/*.pdf
/*.fdb_latexmk
/*.fls
/*.ttt

View File

@ -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

View File

@ -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}

47
charts/example_2_dag.tex Normal file
View File

@ -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}

View File

@ -1,12 +0,0 @@
/auto/
/vc
/refs-processed.bib
/*.aux
/*.bbl
/*.blg
/*.log
/*.out
/*.pdf
/*.fdb_latexmk
/*.fls
/*.ttt

View File

@ -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

View File

@ -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}

42
charts/example_3_dag.tex Normal file
View File

@ -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}

View File

@ -1,12 +0,0 @@
/auto/
/vc
/refs-processed.bib
/*.aux
/*.bbl
/*.blg
/*.log
/*.out
/*.pdf
/*.fdb_latexmk
/*.fls
/*.ttt

View File

@ -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}

47
charts/example_4_dag.tex Normal file
View File

@ -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}

35
charts/example_legend.tex Normal file
View File

@ -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}

1
paper Submodule

@ -0,0 +1 @@
Subproject commit b135cac19e336001401d3ad533a12bdceab913ac

Binary file not shown.

Binary file not shown.

Binary file not shown.