2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Add handout for 'art in ml' presentation

This commit is contained in:
Martin Thoma 2016-03-07 12:43:10 +01:00
parent 285d880599
commit 9e8619cd50
5 changed files with 238 additions and 0 deletions

View file

@ -0,0 +1,27 @@
\begin{tikzpicture}[scale=1.0]
\begin{axis}[
legend pos=north west,
axis x line=middle,
axis y line=middle,
grid = major,
width=16cm,
height=4cm,
grid style={dashed, gray!30},
xmin=-5, % start the diagram at this x-coordinate
xmax= 5, % end the diagram at this x-coordinate
ymin=-1, % start the diagram at this y-coordinate
ymax= 1, % end the diagram at this y-coordinate
%axis background/.style={fill=white},
xlabel=$x$,
ylabel=$y$,
tick align=outside,
enlargelimits=true]
\addplot[green!50!black, ultra thick] coordinates {(-5,-1) (0,-1) (0, 1) (5, 1)};
% \addplot[domain=-5:5, green!50!black, ultra thick,samples=500] {x < 0 ? -1 : 1};
\addplot[domain=-5:5, red, ultra thick,samples=500, dash pattern=on 8pt off 2pt] {1/(1+exp(-x))};
\addplot[domain=-5:5, blue, ultra thick,samples=500, dotted] {tanh(x)};
\addlegendentry{sign function}
\addlegendentry{$\sigmoid$}
\addlegendentry{$\tanh$}
\end{axis}
\end{tikzpicture}