From d10999a3c210c851ac86dc3877f3e059d1602cc5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 24 Jun 2024 07:46:36 +0200 Subject: move handout to KI section --- Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex | 104 ++++++++++++++++++++++++++++ Info/23_24/06/18/11B/handout.tex | 104 ---------------------------- 2 files changed, 104 insertions(+), 104 deletions(-) create mode 100644 Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex delete mode 100644 Info/23_24/06/18/11B/handout.tex diff --git a/Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex b/Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex new file mode 100644 index 00000000..f75c1cae --- /dev/null +++ b/Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex @@ -0,0 +1,104 @@ +\documentclass{handout} +\csname endofdump\endcsname + +\title{Das Perzeptron} + +\begin{document} +\thispagestyle{empty} +\makedate + +Ein lernfähiges Neuron wird auch \pgap{\huge \boldred{Perzeptron}} genannt. + +\begin{defbox}{Wie lernt ein Neuron?} +Anfangs zufällig gewählte Gewichte, sowie der Schwellenwert werden Schritt für Schritt durch die \pgap{\huge \boldred{Deltalernregel}} korrigiert. + +\[ \psolution{\huge w_{neu} = w_{alt} + \textcolor{green}{\alpha} \cdot (\textcolor{magenta}{\text{Label} - \text{berechnetes Ergebnis}}) \cdot \textcolor{orange}{\text{Eingabe}}} \] + +\iflehrer{}{\vspace{3cm}} + +\[ \psolution{\huge s_{neu} = s_{alt} - \textcolor{green}{\alpha} \cdot (\textcolor{magenta}{\text{Label} - \text{berechnetes Ergebnis}}) \cdot \textcolor{orange}{1}} \] +\end{defbox} + +\begin{tabular}{|p{0.3\textwidth} | p{0.65\textwidth} |} +\hline + \vspace{0.1cm} + \hspace{0.8cm} + \begin{tikzpicture} + \node[circle, minimum size = 1cm, draw] (KN) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; + \draw[-Triangle] (s) -- (KN); + \node[right=of KN] (o) {}; + \draw[-Triangle] (KN) -- (o); + + \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {-1} (KN); + \draw[-Triangle] (x2) edge[below] node {2} (KN); + + \node[below=0.1cm of s] {4}; + \node[left=0.1cm of x1] {3}; + \node[left=0.1cm of x2] {2}; + \end{tikzpicture} + + \solution{\huge $3 \cdot (-1) + 2 \cdot 2 - 4 = -3$ \newline + $-3 < 0 \Rightarrow 0$} +& \vspace{0.1cm} +Für ein gegebenes Perzeptron ist bekannt, dass es für die Werte \newline $x_1$ = 3, $x_2 = 2$ den Wert 0 liefern soll. +Dieser Wert wird bei den gegebenen Gewichten auch berechnet. +Die Formeln liefern dieselben Gewichte wie zuvor; die Gewichte werden also nicht angepasst. \vspace{0.3cm}\newline +$w_{1neu} = $ \solution{$-1 + 0,1 \cdot (0 - 0) \cdot 3 = -1 + 0 = -1$} \vspace{0.3cm}\newline +$w_{2neu} = $\solution{$2 + 0,1 \cdot (0 - 0) \cdot 2 = 2 + 0 = 2$} \vspace{0.3cm}\newline +$s_{neu} = $\solution{$4 - 0,1 \cdot (0 - 0) \cdot 1 = 4 + 0 = 4$} \\ +\hline + \vspace{0.1cm} + \hspace{0.8cm} + \begin{tikzpicture} + \node[circle, minimum size = 1cm, draw] (KN) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; + \draw[-Triangle] (s) -- (KN); + \node[right=of KN] (o) {}; + \draw[-Triangle] (KN) -- (o); + + \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {-1} (KN); + \draw[-Triangle] (x2) edge[below] node {2} (KN); + + \node[below=0.1cm of s] {4}; + \node[left=0.1cm of x1] {4}; + \node[left=0.1cm of x2] {3}; + \end{tikzpicture} + + \solution{\huge $4 \cdot (-1) + 3 \cdot 2 - 4 = -2$ \newline + $-2 < 0 \Rightarrow 0$} +& \vspace{0.1cm} Außerdem ist bekannt, dass sich für $x_1 = 4$, $x_2 = 3$ der Wert 1 ergeben soll. +Das Perzeptron ermittelt aber den Wert 0. +Deshalb werden die Gewichte und der Schwellenwert in die passende Richtung korrigiert; die Stärke der Anpassung hängt vom Eingangswert ab. \vspace{0.3cm}\newline +$w_{1neu} = $\solution{$-1 + 0,1 \cdot (1 - 0) \cdot 4 = -0,6$} \vspace{0.3cm}\newline +$w_{2neu} = $\solution{$2 + 0,1 \cdot (1 - 0) \cdot 3 = 2,3$} \vspace{0.3cm}\newline +$s_{neu} = $\solution{$4 - 0,1 \cdot (1 - 0) \cdot 1 = 3,9 $} \\ +\hline + \vspace{0.1cm} + \hspace{0.8cm} + \begin{tikzpicture} + \node[circle, minimum size = 1cm, draw] (KN) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; + \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; + \draw[-Triangle] (s) -- (KN); + \node[right=of KN] (o) {}; + \draw[-Triangle] (KN) -- (o); + + \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {\solution{$-0,6$}} (KN); + \draw[-Triangle] (x2) edge[below] node {\solution{$2,3$}} (KN); + + \node[below=0.1cm of s] {\solution{$3,9$}}; + \node[left=0.1cm of x1] {$x_1$}; + \node[left=0.1cm of x2] {$x_2$}; + \end{tikzpicture} +& \vspace{0.1cm} +Für den nächsten Trainingsdatensatz werden die angepassten Gewichte verwendet. +Durch viele weitere Berechnungsschritte nähern sich Gewichte und Schwellenwert den korrekten Werten an. \\ +\hline +\end{tabular} +\end{document} diff --git a/Info/23_24/06/18/11B/handout.tex b/Info/23_24/06/18/11B/handout.tex deleted file mode 100644 index f75c1cae..00000000 --- a/Info/23_24/06/18/11B/handout.tex +++ /dev/null @@ -1,104 +0,0 @@ -\documentclass{handout} -\csname endofdump\endcsname - -\title{Das Perzeptron} - -\begin{document} -\thispagestyle{empty} -\makedate - -Ein lernfähiges Neuron wird auch \pgap{\huge \boldred{Perzeptron}} genannt. - -\begin{defbox}{Wie lernt ein Neuron?} -Anfangs zufällig gewählte Gewichte, sowie der Schwellenwert werden Schritt für Schritt durch die \pgap{\huge \boldred{Deltalernregel}} korrigiert. - -\[ \psolution{\huge w_{neu} = w_{alt} + \textcolor{green}{\alpha} \cdot (\textcolor{magenta}{\text{Label} - \text{berechnetes Ergebnis}}) \cdot \textcolor{orange}{\text{Eingabe}}} \] - -\iflehrer{}{\vspace{3cm}} - -\[ \psolution{\huge s_{neu} = s_{alt} - \textcolor{green}{\alpha} \cdot (\textcolor{magenta}{\text{Label} - \text{berechnetes Ergebnis}}) \cdot \textcolor{orange}{1}} \] -\end{defbox} - -\begin{tabular}{|p{0.3\textwidth} | p{0.65\textwidth} |} -\hline - \vspace{0.1cm} - \hspace{0.8cm} - \begin{tikzpicture} - \node[circle, minimum size = 1cm, draw] (KN) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; - \draw[-Triangle] (s) -- (KN); - \node[right=of KN] (o) {}; - \draw[-Triangle] (KN) -- (o); - - \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {-1} (KN); - \draw[-Triangle] (x2) edge[below] node {2} (KN); - - \node[below=0.1cm of s] {4}; - \node[left=0.1cm of x1] {3}; - \node[left=0.1cm of x2] {2}; - \end{tikzpicture} - - \solution{\huge $3 \cdot (-1) + 2 \cdot 2 - 4 = -3$ \newline - $-3 < 0 \Rightarrow 0$} -& \vspace{0.1cm} -Für ein gegebenes Perzeptron ist bekannt, dass es für die Werte \newline $x_1$ = 3, $x_2 = 2$ den Wert 0 liefern soll. -Dieser Wert wird bei den gegebenen Gewichten auch berechnet. -Die Formeln liefern dieselben Gewichte wie zuvor; die Gewichte werden also nicht angepasst. \vspace{0.3cm}\newline -$w_{1neu} = $ \solution{$-1 + 0,1 \cdot (0 - 0) \cdot 3 = -1 + 0 = -1$} \vspace{0.3cm}\newline -$w_{2neu} = $\solution{$2 + 0,1 \cdot (0 - 0) \cdot 2 = 2 + 0 = 2$} \vspace{0.3cm}\newline -$s_{neu} = $\solution{$4 - 0,1 \cdot (0 - 0) \cdot 1 = 4 + 0 = 4$} \\ -\hline - \vspace{0.1cm} - \hspace{0.8cm} - \begin{tikzpicture} - \node[circle, minimum size = 1cm, draw] (KN) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; - \draw[-Triangle] (s) -- (KN); - \node[right=of KN] (o) {}; - \draw[-Triangle] (KN) -- (o); - - \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {-1} (KN); - \draw[-Triangle] (x2) edge[below] node {2} (KN); - - \node[below=0.1cm of s] {4}; - \node[left=0.1cm of x1] {4}; - \node[left=0.1cm of x2] {3}; - \end{tikzpicture} - - \solution{\huge $4 \cdot (-1) + 3 \cdot 2 - 4 = -2$ \newline - $-2 < 0 \Rightarrow 0$} -& \vspace{0.1cm} Außerdem ist bekannt, dass sich für $x_1 = 4$, $x_2 = 3$ der Wert 1 ergeben soll. -Das Perzeptron ermittelt aber den Wert 0. -Deshalb werden die Gewichte und der Schwellenwert in die passende Richtung korrigiert; die Stärke der Anpassung hängt vom Eingangswert ab. \vspace{0.3cm}\newline -$w_{1neu} = $\solution{$-1 + 0,1 \cdot (1 - 0) \cdot 4 = -0,6$} \vspace{0.3cm}\newline -$w_{2neu} = $\solution{$2 + 0,1 \cdot (1 - 0) \cdot 3 = 2,3$} \vspace{0.3cm}\newline -$s_{neu} = $\solution{$4 - 0,1 \cdot (1 - 0) \cdot 1 = 3,9 $} \\ -\hline - \vspace{0.1cm} - \hspace{0.8cm} - \begin{tikzpicture} - \node[circle, minimum size = 1cm, draw] (KN) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, above left=of KN] (x1) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below left=of KN] (x2) {}; - \node[circle, inner sep=0pt, minimum size = 2pt, fill, below=of KN] (s) {}; - \draw[-Triangle] (s) -- (KN); - \node[right=of KN] (o) {}; - \draw[-Triangle] (KN) -- (o); - - \draw[-Triangle] (x1) edge[above] node[xshift=0.2cm] {\solution{$-0,6$}} (KN); - \draw[-Triangle] (x2) edge[below] node {\solution{$2,3$}} (KN); - - \node[below=0.1cm of s] {\solution{$3,9$}}; - \node[left=0.1cm of x1] {$x_1$}; - \node[left=0.1cm of x2] {$x_2$}; - \end{tikzpicture} -& \vspace{0.1cm} -Für den nächsten Trainingsdatensatz werden die angepassten Gewichte verwendet. -Durch viele weitere Berechnungsschritte nähern sich Gewichte und Schwellenwert den korrekten Werten an. \\ -\hline -\end{tabular} -\end{document} -- cgit v1.2.3