-
Notifications
You must be signed in to change notification settings - Fork 0
/
figure-overfitting-tikz.tex
53 lines (53 loc) · 1.51 KB
/
figure-overfitting-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
44
45
46
47
48
49
50
51
52
53
% SPDX-License-Identifier: CC-BY-4.0
% Copyright 2018 Toni Dietze
\begin{tikzpicture}
[ tri/.style =
{ inner sep=0.12em
, shape border rotate=90
, isosceles triangle
, isosceles triangle apex angle=60
, draw
}
]
\matrix[anchor=base, column sep=1em, row sep=3em] (m) {
\node[anchor = base east, align = right] {corpus: \\ {\footnotesize(training data)}\phantom{:}};
&& \node[tri, fill = CVD light green ] {B};
& \node[tri, fill = CVD light green ] {C};
&& \node[tri, fill = CVD light green ] {E};
\\ \node[anchor=base east] {$\trees{\varSigma}\colon$};
& \node[tri, fill = CVD light red] (A) {A};
& \node[tri, fill = CVD light green ] (B) {B};
& \node[tri, fill = CVD light green ] (C) {C};
& \node[tri, fill = CVD light yellow] (D) {D};
& \node[tri, fill = CVD light green ] (E) {E};
& \node[tri, fill = CVD light red ] (F) {F};
& \node[tri, fill = CVD light yellow] (G) {G};
& \node {$\dots$};
\\ \node[anchor=base east, visible=<2->] {probabilities:};
& \node<4-> (pA) {0};
& \node<2-> (pB) {0.2};
& \node<2-> (pC) {0.1};
& \node<3-> (pD) {0.1};
& \node<2-> (pE) {0.4};
& \node<4-> (pF) {0};
& \node<3-> (pG) {0.1};
& \node<2-> {$\dots$};
\\
};
\begin{scope}
[ |->
, > = Computer Modern Rightarrow
, line width = 0.4pt
, shorten < = 0.75em
, shorten > = 0.5em
, node distance = 4em
]
\draw<4-> (A) -- (pA);
\draw<2-> (B) -- (pB);
\draw<2-> (C) -- (pC);
\draw<3-> (D) -- (pD);
\draw<2-> (E) -- (pE);
\draw<4-> (F) -- (pF);
\draw<3-> (G) -- (pG);
\end{scope}
\end{tikzpicture}