2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

Update image

This commit is contained in:
Martin Thoma 2017-01-08 17:13:45 +01:00
parent ad0d83b2d2
commit b73c601641
2 changed files with 9 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

@ -5,9 +5,13 @@
\usetikzlibrary{positioning} \usetikzlibrary{positioning}
\usetikzlibrary{decorations.text} \usetikzlibrary{decorations.text}
\usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{arrows.meta}
\begin{document} \begin{document}
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{training}=[red, thick,samples=200,dashed]
\tikzstyle{testing}=[green, thick,samples=200]
\tikzstyle{arrow}=[<->, Latex-Latex, thick]
\begin{axis}[ \begin{axis}[
legend pos=north east, legend pos=north east,
axis x line=middle, axis x line=middle,
@ -26,16 +30,14 @@
tick align=outside, tick align=outside,
minor tick num=-3, minor tick num=-3,
tension=0.08] tension=0.08]
\addplot[domain=1:100, red, thick,samples=200,dashed] {1/(x+2)+0.4}; \addplot[domain=1:100, testing] {1/(x+2)+0.4};
\addplot[domain=1:100, green, thick,samples=200] {0.4-(1/(x+2))}; \addplot[domain=1:100, training] {0.4-(1/(x+2))};
% \draw[dashed,thick] (axis cs:0,0.4) -- (axis cs:110,0.4); % \draw[dashed,thick] (axis cs:0,0.4) -- (axis cs:110,0.4);
\draw[dashed,thick] (axis cs:0,0.2) -- (axis cs:110,0.2); \draw[dashed,thick] (axis cs:0,0.2) -- (axis cs:110,0.2);
\draw[thick,<->] (axis cs:80,0.2) -- (axis cs:80,0.3878); \path[arrow] (axis cs:80,0.2) edge node[right, midway] {avoidable bias} (axis cs:80,0.3878);
\draw[thick,<->] (axis cs:20,0.3545) -- (axis cs:20,0.4454); \path[arrow] (axis cs:20,0.3545) edge node[left, midway] {variance} (axis cs:20,0.4454);
\draw[decoration={text along path, text={desired}, text align={center}}, decorate] (axis cs:20,0.21) -- (axis cs:50,0.21); \draw[decoration={text along path, text={human-level error}, text align={center}}, decorate] (axis cs:20,0.21) -- (axis cs:50,0.21);
\draw[decoration={text along path, text={bias}, text align={center}}, decorate] (axis cs:80,0.28) -- (axis cs:90,0.28);
\draw[decoration={text along path, text={variance}, text align={center}}, decorate] (axis cs:0,0.39) -- (axis cs:20,0.39);
\addlegendentry{Validation} \addlegendentry{Validation}
\addlegendentry{Training} \addlegendentry{Training}