From d968e6c6fb7cb2e4c6f9dc154620a1e0d83abca7 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 13 Apr 2026 16:57:50 +0200 Subject: move AI material from MUG_SWG_SG upto 11 --- Info/11/4/Aufgaben/color_cube.png | 1 + Info/11/4/Aufgaben/farblerner.tex | 124 +++++++++++++++++++++ Info/11/4/Intro/img/alan_turing.jpg | Bin 0 -> 90020 bytes Info/11/4/Intro/slides.md | 72 ++++++++++++ Info/11/4/KI_Klassifikation_Hefteintrag.pdf | Bin 0 -> 431812 bytes Info/11/4/Perzeptron/handout.tex | 104 +++++++++++++++++ Info/11/MUG_SWG_SG/4/Aufgaben/color_cube.png | 1 - Info/11/MUG_SWG_SG/4/Aufgaben/farblerner.tex | 124 --------------------- Info/11/MUG_SWG_SG/4/Intro/img/alan_turing.jpg | Bin 90020 -> 0 bytes Info/11/MUG_SWG_SG/4/Intro/slides.md | 72 ------------ .../MUG_SWG_SG/4/KI_Klassifikation_Hefteintrag.pdf | Bin 431812 -> 0 bytes Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex | 104 ----------------- 12 files changed, 301 insertions(+), 301 deletions(-) create mode 120000 Info/11/4/Aufgaben/color_cube.png create mode 100644 Info/11/4/Aufgaben/farblerner.tex create mode 100644 Info/11/4/Intro/img/alan_turing.jpg create mode 100644 Info/11/4/Intro/slides.md create mode 100644 Info/11/4/KI_Klassifikation_Hefteintrag.pdf create mode 100644 Info/11/4/Perzeptron/handout.tex delete mode 120000 Info/11/MUG_SWG_SG/4/Aufgaben/color_cube.png delete mode 100644 Info/11/MUG_SWG_SG/4/Aufgaben/farblerner.tex delete mode 100644 Info/11/MUG_SWG_SG/4/Intro/img/alan_turing.jpg delete mode 100644 Info/11/MUG_SWG_SG/4/Intro/slides.md delete mode 100644 Info/11/MUG_SWG_SG/4/KI_Klassifikation_Hefteintrag.pdf delete mode 100644 Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex diff --git a/Info/11/4/Aufgaben/color_cube.png b/Info/11/4/Aufgaben/color_cube.png new file mode 120000 index 00000000..74cfdb9b --- /dev/null +++ b/Info/11/4/Aufgaben/color_cube.png @@ -0,0 +1 @@ +Copyrighted/color_cube.png \ No newline at end of file diff --git a/Info/11/4/Aufgaben/farblerner.tex b/Info/11/4/Aufgaben/farblerner.tex new file mode 100644 index 00000000..7b0a3bc0 --- /dev/null +++ b/Info/11/4/Aufgaben/farblerner.tex @@ -0,0 +1,124 @@ +%% KI-Farblerner +%%% Einordnung KI Verfahren 2 BE +%%% Abstandsbestimmungen 2 BE +%%% Bedeutung von k bei Farben 2 BE +%%% Vor und Nachteile von KNN 2 BE +%%% Tabelle mit Abständen Bestimmung des k 3 BE +\definecolor{mywhite}{rgb}{1, 1, 1} +\definecolor{myblack}{rgb}{0, 0, 0} +\definecolor{myred}{rgb}{1, 0, 0} +\definecolor{mygreen}{rgb}{0, 1, 0} +\definecolor{myblue}{rgb}{0, 0, 1} +\definecolor{mytuerkis}{rgb}{0, 1, 1} +\definecolor{mymagenta}{rgb}{1, 0, 1} +\definecolor{myyellow}{rgb}{1, 1, 0} +\definecolor{mycolor}{RGB}{100, 10, 180} +\begin{Aufg}[Farblerner] +Um Kinder beim Lernen von Farbnamen zu unterstützen, soll ein System erstellt werden, das zu einer zufälligen Farbe die passendste bereits bekannte Farbbezeichnung zuordnet. +Farben werden dabei durch ihren Anteil an \boldred{R}ot, \boldred{G}rün und \boldred{B}lau jeweils mit einem Byte (Werten zwischen 0 und 255) gespeichert. +Die Farben bilden einen dreidimensionalen Farbraum, in dem jede Farbe genau einem Punkt entspricht. + +\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}} +\includegraphics[keepaspectratio, width=0.45\textwidth]{Aufgaben/color_cube.png} & +\vspace{-5cm} +\textbf{Gelernte Farbennamen:}\vspace{0.2cm}\newline +\begin{tabular}{c | c | c | c | c} +weiß & 255 & 255 & 255 & \textcolor{mywhite}{\rule{0.5cm}{0.5cm}} \\ +\hline +schwarz & 0 & 0 & 0 & \textcolor{myblack}{\rule{0.5cm}{0.5cm}} \\ +\hline +rot & 255 & 0 & 0 & \textcolor{myred}{\rule{0.5cm}{0.5cm}} \\ +\hline +grün & 0 & 255 & 0 & \textcolor{mygreen}{\rule{0.5cm}{0.5cm}} \\ +\hline +blau & 0 & 0 & 255 & \textcolor{myblue}{\rule{0.5cm}{0.5cm}} \\ +\hline +türkis & 0 & 255 & 255 & \textcolor{mytuerkis}{\rule{0.5cm}{0.5cm}} \\ +\hline +magenta & 255 & 0 & 255 & \textcolor{mymagenta}{\rule{0.5cm}{0.5cm}} \\ +\hline +gelb & 255 & 255 & 0& \textcolor{myyellow}{\rule{0.5cm}{0.5cm}} \\ +\end{tabular}\\ +\end{tabular} +\begin{enumerate}[a)] +\item Gib den allgemeinen Ansatz sowie die Art des KI-Verfahrens der Klassifikation von Daten mit einem k-Nächste-Nachbarn-Verfahren an. +\iflehrer{}{\\ \liniert{6}} +\item Bestimme den Manhatten-Abstand zum nächsten Nachbarn der zufälligen Farbe (100, 10, 180) \textcolor{mycolor}{\rule{0.5cm}{0.5cm}} und gib den dadurch vorgeschlagenen Farbnamen an. +\iflehrer{}{\\ \liniert{2}} +\item Gib den in der Situation verwendeten Wert für $k$ an und beschreibe den allgemeinen Einfluss von $k$ auf die Ergebnisse des $k$-Nächste-Nachbarn-Verfahrens. +\iflehrer{}{\\ \liniert{5}\clearpage} +\item Gib je zwei Vor-/ und Nachteile des $k$-Nächste-Nachbarn-Verfahrens an. +\iflehrer{}{\\ \liniert{4}} +\item Das Programm wurde mit weiteren Datenpunkten und Farbbezeichnungen erweitert. +Außerdem wird eine Farbbezeichnung jetzt mit einem Mehrheits-Votum der Nachbarn bestimmt. +Der folgende Ausschnitt zeigt zur Vereinfachung nur die zwei Farbdimensionen Rot und Blau. +Bestimme nachvollziehbar das gewählte \textbf{$k$} für die in der Tabelle dargestellte Entscheidung der neuen Farbe (150, 160). + +\definecolor{clr1}{RGB}{190, 0, 80} +\definecolor{clr2}{RGB}{80, 0, 170} +\definecolor{clr3}{RGB}{60, 0, 200} +\definecolor{clr4}{RGB}{190, 0, 90} +\definecolor{clr5}{RGB}{200, 0, 150} +\definecolor{clr6}{RGB}{160, 0, 210} +\definecolor{clr7}{RGB}{140, 0, 100} +\definecolor{clrx}{RGB}{150, 0, 160} + +\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}} +\hspace{-1cm}\begin{tikzpicture} + \begin{axis}[ + xmin=50,xmax=210, + ymin=70,ymax=220, + enlargelimits=false + ] + \addplot[mark=x, clr7] (140, 100); + \addplot[mark=x, clr1] (190, 80); + \addplot[mark=x, color=clr2] (80, 170); + \addplot[mark=x, color=clr3] (60, 200); + \addplot[mark=x, color=clr4] (190, 90); + \addplot[mark=x, color=clr5] (200, 150); + \addplot[mark=x, color=clr6] (160, 210); + \addplot[mark=o, color=clrx] (150, 160); + \end{axis} +\end{tikzpicture} & +\vspace{-6cm} +\begin{tabular}{c | c | c | c} +rot & 140 & 100 & \textcolor{clr7}{\rule{0.5cm}{0.5cm}} \\ +\hline +rot & 190 & 80 & \textcolor{clr1}{\rule{0.5cm}{0.5cm}} \\ +\hline +rot & 190 & 90 & \textcolor{clr4}{\rule{0.5cm}{0.5cm}} \\ +\hline +blau & 80 & 170 & \textcolor{clr2}{\rule{0.5cm}{0.5cm}} \\ +\hline +blau & 60 & 200 & \textcolor{clr3}{\rule{0.5cm}{0.5cm}} \\ +\hline +lila & 200 & 150 & \textcolor{clr5}{\rule{0.5cm}{0.5cm}} \\ +\hline +lila & 160 & 210 & \textcolor{clr6}{\rule{0.5cm}{0.5cm}} \\ +\hline +\textbf{\underline{\textcolor{red!80!black}{rot}}} & 150 & 160 & \textcolor{clrx}{\rule{0.5cm}{0.5cm}} \\ +\end{tabular}\\ +\end{tabular} +\end{enumerate} +\end{Aufg} + +\begin{Lsg} +\begin{enumerate}[a)] +\item Ein datenbasiertes\Point Verfahren das dem überwachten Lernen\Point zugeordnet werden kann. +\item d = $\abs{r_2 - r_1} + \abs{b_2 - b_1}\Halfpoint + \abs{g_2 - g_1}\Halfpoint = \abs{0 - 100} + \abs{0 - 10} + \abs{255 - 180} = 185\Halfpoint \rightarrow$ Blau\Halfpoint +\item Es wird nur der nächste Nachbar betrachtet $\rightarrow k = 1$\Point. +Für ein klein gewähltes $k$ besteht die Gefahr, dass Rauschen in den Trainingsdaten die Klassifikationsergebnisse auf den Testdaten verschlechtert.\Halfpoint +Wird $k$ zu groß gewählt, besteht die Gefahr, Punkte mit großem Abstand zu $x$ in die Klassifikationsentscheidung mit einzubeziehen. \Halfpoint +\item Vorteile: Kein Trainingszeit\Halfpoint, Leicht zu programmieren\Halfpoint, (einfaches Modell\HalfpointSymbol) \\ +Nachteile: Lange Klassifikationszeit\Halfpoint, Bestimmung von $k$\Halfpoint, (Normierung\HalfpointSymbol) \\ +\item + $d = \abs{140-150} + \abs{100-160} = 70$ \\ + $d = \abs{190-150} + \abs{80-160} = 120$ \\ + $d = \abs{80-150} + \abs{170-160} = 80$ \\ + $d = \abs{60-150} + \abs{200-160} = 130$ \\ + $d = \abs{190-150} + \abs{90-160} = 110$ \\ + $d = \abs{200-150} + \abs{150-160} = 60$ \\ + $d = \abs{160-150} + \abs{210-160} = 60$\Point (Alternativ mit Lineal) \\ + $k=6$\Point Damit rot die Mehrheit ist\Point \\ +\end{enumerate} +\end{Lsg} diff --git a/Info/11/4/Intro/img/alan_turing.jpg b/Info/11/4/Intro/img/alan_turing.jpg new file mode 100644 index 00000000..6d884a3c Binary files /dev/null and b/Info/11/4/Intro/img/alan_turing.jpg differ diff --git a/Info/11/4/Intro/slides.md b/Info/11/4/Intro/slides.md new file mode 100644 index 00000000..659b13f1 --- /dev/null +++ b/Info/11/4/Intro/slides.md @@ -0,0 +1,72 @@ +--- +author: Florian Fischer +theme: metropolis +aspectratio: 169 +--- + +## Wiederholung + +1. Nenne mindestens eine gesellschaftliche und private Chance des Internets. +2. Nenne mindestens ein gesellschaftliches und privates Risiko des Internets. + 1. Nenne zu deinen Beispielen mindestens eine Gegenmaßnahme. +3. Beschreibe den unterschied zwischen Datenschutz und Datensicherheit. + +## {.standout} + +> „Bei künstlicher Intelligenz geht es darum, Maschinen zu entwickeln, die sich in einer Weise verhalten, die man beiMenschen als intelligent bezeichnen würde“ - John McCarthy (1955) + +## {.standout} + +> KI sind „Programme, die es ermöglichen, wahrzunehmen, logisch zu schließen und zu agieren.“ - Patrick H. Winston (1992) + +## {.standout} + +> „KI ist die Entwicklung mentaler Fähigkeiten durch die Nutzung von Computermodellen.“ - Eugene Charniak ‚und Drew McDermott (1985) + +## {.standout} + +> „KI ist die Automatisierung von Aktivitäten, die wir dem menschlichen Denken zuordnen, Aktivitäten wie beispielsweise Entscheidungsfindung, Problemlösung, Lernen [...]“ — Richard Bellman (1978) + +## {.standout} + +> „KI ist die Wissenschaft, die der Frage nachgeht, wie man Computer dazu bringen kann, Dinge zu tun, bei denen ihnen ‚momentan der Mensch noch überlegen ist.” — Elaine Rich und Kevin Knight (1991) + +## \only<1>{Weiter gehts!}\only<3>{Ich bin keine Katze!}\only<4>{Ich bin keine Roboter!} + +`\only<2->{`{=latex} +\vspace{-0.5cm} +![](img/Copyrighted/google-captcha-images.png){.center height=95%} +`}`{=latex} + +## CAPTCHA + +### \faIcon{lightbulb} Was heißt das eigentlich? +\pause +**c**ompletely **a**utomated **p**ublic **T**uring test to tell **c**omputers and **h**umans **a**part + +\pause +### Alan Turing +::: {.columns} +:::: {.column width=50%} +* Manchen eventuell bekannt aus *The Imitation Game* oder dem Klassenzimmer. +* Britischer Mathematiker, Kryptoanalytiker und Informatiker +:::: + +:::: {.column width=50%} +\vspace{-0.8cm} +![](img/alan_turing.jpg){.center height=75%} +:::: +::: + +## Turing Test + +::: {.columns align=center} +:::: {.column width=50%} +![Klassischer Turing Test](img/Copyrighted/turing_test.png) +:::: + +:::: {.column width=50%} +\large +Der Turing-Test beschreibt ein Verfahren, bei der ein Computerprogramm so agieren muss, dass es für eine Fragen stellende Person nicht von einem echten Menschen unterscheidbar ist. +:::: +::: diff --git a/Info/11/4/KI_Klassifikation_Hefteintrag.pdf b/Info/11/4/KI_Klassifikation_Hefteintrag.pdf new file mode 100644 index 00000000..567960fc Binary files /dev/null and b/Info/11/4/KI_Klassifikation_Hefteintrag.pdf differ diff --git a/Info/11/4/Perzeptron/handout.tex b/Info/11/4/Perzeptron/handout.tex new file mode 100644 index 00000000..f75c1cae --- /dev/null +++ b/Info/11/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/11/MUG_SWG_SG/4/Aufgaben/color_cube.png b/Info/11/MUG_SWG_SG/4/Aufgaben/color_cube.png deleted file mode 120000 index 74cfdb9b..00000000 --- a/Info/11/MUG_SWG_SG/4/Aufgaben/color_cube.png +++ /dev/null @@ -1 +0,0 @@ -Copyrighted/color_cube.png \ No newline at end of file diff --git a/Info/11/MUG_SWG_SG/4/Aufgaben/farblerner.tex b/Info/11/MUG_SWG_SG/4/Aufgaben/farblerner.tex deleted file mode 100644 index 7b0a3bc0..00000000 --- a/Info/11/MUG_SWG_SG/4/Aufgaben/farblerner.tex +++ /dev/null @@ -1,124 +0,0 @@ -%% KI-Farblerner -%%% Einordnung KI Verfahren 2 BE -%%% Abstandsbestimmungen 2 BE -%%% Bedeutung von k bei Farben 2 BE -%%% Vor und Nachteile von KNN 2 BE -%%% Tabelle mit Abständen Bestimmung des k 3 BE -\definecolor{mywhite}{rgb}{1, 1, 1} -\definecolor{myblack}{rgb}{0, 0, 0} -\definecolor{myred}{rgb}{1, 0, 0} -\definecolor{mygreen}{rgb}{0, 1, 0} -\definecolor{myblue}{rgb}{0, 0, 1} -\definecolor{mytuerkis}{rgb}{0, 1, 1} -\definecolor{mymagenta}{rgb}{1, 0, 1} -\definecolor{myyellow}{rgb}{1, 1, 0} -\definecolor{mycolor}{RGB}{100, 10, 180} -\begin{Aufg}[Farblerner] -Um Kinder beim Lernen von Farbnamen zu unterstützen, soll ein System erstellt werden, das zu einer zufälligen Farbe die passendste bereits bekannte Farbbezeichnung zuordnet. -Farben werden dabei durch ihren Anteil an \boldred{R}ot, \boldred{G}rün und \boldred{B}lau jeweils mit einem Byte (Werten zwischen 0 und 255) gespeichert. -Die Farben bilden einen dreidimensionalen Farbraum, in dem jede Farbe genau einem Punkt entspricht. - -\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}} -\includegraphics[keepaspectratio, width=0.45\textwidth]{Aufgaben/color_cube.png} & -\vspace{-5cm} -\textbf{Gelernte Farbennamen:}\vspace{0.2cm}\newline -\begin{tabular}{c | c | c | c | c} -weiß & 255 & 255 & 255 & \textcolor{mywhite}{\rule{0.5cm}{0.5cm}} \\ -\hline -schwarz & 0 & 0 & 0 & \textcolor{myblack}{\rule{0.5cm}{0.5cm}} \\ -\hline -rot & 255 & 0 & 0 & \textcolor{myred}{\rule{0.5cm}{0.5cm}} \\ -\hline -grün & 0 & 255 & 0 & \textcolor{mygreen}{\rule{0.5cm}{0.5cm}} \\ -\hline -blau & 0 & 0 & 255 & \textcolor{myblue}{\rule{0.5cm}{0.5cm}} \\ -\hline -türkis & 0 & 255 & 255 & \textcolor{mytuerkis}{\rule{0.5cm}{0.5cm}} \\ -\hline -magenta & 255 & 0 & 255 & \textcolor{mymagenta}{\rule{0.5cm}{0.5cm}} \\ -\hline -gelb & 255 & 255 & 0& \textcolor{myyellow}{\rule{0.5cm}{0.5cm}} \\ -\end{tabular}\\ -\end{tabular} -\begin{enumerate}[a)] -\item Gib den allgemeinen Ansatz sowie die Art des KI-Verfahrens der Klassifikation von Daten mit einem k-Nächste-Nachbarn-Verfahren an. -\iflehrer{}{\\ \liniert{6}} -\item Bestimme den Manhatten-Abstand zum nächsten Nachbarn der zufälligen Farbe (100, 10, 180) \textcolor{mycolor}{\rule{0.5cm}{0.5cm}} und gib den dadurch vorgeschlagenen Farbnamen an. -\iflehrer{}{\\ \liniert{2}} -\item Gib den in der Situation verwendeten Wert für $k$ an und beschreibe den allgemeinen Einfluss von $k$ auf die Ergebnisse des $k$-Nächste-Nachbarn-Verfahrens. -\iflehrer{}{\\ \liniert{5}\clearpage} -\item Gib je zwei Vor-/ und Nachteile des $k$-Nächste-Nachbarn-Verfahrens an. -\iflehrer{}{\\ \liniert{4}} -\item Das Programm wurde mit weiteren Datenpunkten und Farbbezeichnungen erweitert. -Außerdem wird eine Farbbezeichnung jetzt mit einem Mehrheits-Votum der Nachbarn bestimmt. -Der folgende Ausschnitt zeigt zur Vereinfachung nur die zwei Farbdimensionen Rot und Blau. -Bestimme nachvollziehbar das gewählte \textbf{$k$} für die in der Tabelle dargestellte Entscheidung der neuen Farbe (150, 160). - -\definecolor{clr1}{RGB}{190, 0, 80} -\definecolor{clr2}{RGB}{80, 0, 170} -\definecolor{clr3}{RGB}{60, 0, 200} -\definecolor{clr4}{RGB}{190, 0, 90} -\definecolor{clr5}{RGB}{200, 0, 150} -\definecolor{clr6}{RGB}{160, 0, 210} -\definecolor{clr7}{RGB}{140, 0, 100} -\definecolor{clrx}{RGB}{150, 0, 160} - -\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}} -\hspace{-1cm}\begin{tikzpicture} - \begin{axis}[ - xmin=50,xmax=210, - ymin=70,ymax=220, - enlargelimits=false - ] - \addplot[mark=x, clr7] (140, 100); - \addplot[mark=x, clr1] (190, 80); - \addplot[mark=x, color=clr2] (80, 170); - \addplot[mark=x, color=clr3] (60, 200); - \addplot[mark=x, color=clr4] (190, 90); - \addplot[mark=x, color=clr5] (200, 150); - \addplot[mark=x, color=clr6] (160, 210); - \addplot[mark=o, color=clrx] (150, 160); - \end{axis} -\end{tikzpicture} & -\vspace{-6cm} -\begin{tabular}{c | c | c | c} -rot & 140 & 100 & \textcolor{clr7}{\rule{0.5cm}{0.5cm}} \\ -\hline -rot & 190 & 80 & \textcolor{clr1}{\rule{0.5cm}{0.5cm}} \\ -\hline -rot & 190 & 90 & \textcolor{clr4}{\rule{0.5cm}{0.5cm}} \\ -\hline -blau & 80 & 170 & \textcolor{clr2}{\rule{0.5cm}{0.5cm}} \\ -\hline -blau & 60 & 200 & \textcolor{clr3}{\rule{0.5cm}{0.5cm}} \\ -\hline -lila & 200 & 150 & \textcolor{clr5}{\rule{0.5cm}{0.5cm}} \\ -\hline -lila & 160 & 210 & \textcolor{clr6}{\rule{0.5cm}{0.5cm}} \\ -\hline -\textbf{\underline{\textcolor{red!80!black}{rot}}} & 150 & 160 & \textcolor{clrx}{\rule{0.5cm}{0.5cm}} \\ -\end{tabular}\\ -\end{tabular} -\end{enumerate} -\end{Aufg} - -\begin{Lsg} -\begin{enumerate}[a)] -\item Ein datenbasiertes\Point Verfahren das dem überwachten Lernen\Point zugeordnet werden kann. -\item d = $\abs{r_2 - r_1} + \abs{b_2 - b_1}\Halfpoint + \abs{g_2 - g_1}\Halfpoint = \abs{0 - 100} + \abs{0 - 10} + \abs{255 - 180} = 185\Halfpoint \rightarrow$ Blau\Halfpoint -\item Es wird nur der nächste Nachbar betrachtet $\rightarrow k = 1$\Point. -Für ein klein gewähltes $k$ besteht die Gefahr, dass Rauschen in den Trainingsdaten die Klassifikationsergebnisse auf den Testdaten verschlechtert.\Halfpoint -Wird $k$ zu groß gewählt, besteht die Gefahr, Punkte mit großem Abstand zu $x$ in die Klassifikationsentscheidung mit einzubeziehen. \Halfpoint -\item Vorteile: Kein Trainingszeit\Halfpoint, Leicht zu programmieren\Halfpoint, (einfaches Modell\HalfpointSymbol) \\ -Nachteile: Lange Klassifikationszeit\Halfpoint, Bestimmung von $k$\Halfpoint, (Normierung\HalfpointSymbol) \\ -\item - $d = \abs{140-150} + \abs{100-160} = 70$ \\ - $d = \abs{190-150} + \abs{80-160} = 120$ \\ - $d = \abs{80-150} + \abs{170-160} = 80$ \\ - $d = \abs{60-150} + \abs{200-160} = 130$ \\ - $d = \abs{190-150} + \abs{90-160} = 110$ \\ - $d = \abs{200-150} + \abs{150-160} = 60$ \\ - $d = \abs{160-150} + \abs{210-160} = 60$\Point (Alternativ mit Lineal) \\ - $k=6$\Point Damit rot die Mehrheit ist\Point \\ -\end{enumerate} -\end{Lsg} diff --git a/Info/11/MUG_SWG_SG/4/Intro/img/alan_turing.jpg b/Info/11/MUG_SWG_SG/4/Intro/img/alan_turing.jpg deleted file mode 100644 index 6d884a3c..00000000 Binary files a/Info/11/MUG_SWG_SG/4/Intro/img/alan_turing.jpg and /dev/null differ diff --git a/Info/11/MUG_SWG_SG/4/Intro/slides.md b/Info/11/MUG_SWG_SG/4/Intro/slides.md deleted file mode 100644 index 659b13f1..00000000 --- a/Info/11/MUG_SWG_SG/4/Intro/slides.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -author: Florian Fischer -theme: metropolis -aspectratio: 169 ---- - -## Wiederholung - -1. Nenne mindestens eine gesellschaftliche und private Chance des Internets. -2. Nenne mindestens ein gesellschaftliches und privates Risiko des Internets. - 1. Nenne zu deinen Beispielen mindestens eine Gegenmaßnahme. -3. Beschreibe den unterschied zwischen Datenschutz und Datensicherheit. - -## {.standout} - -> „Bei künstlicher Intelligenz geht es darum, Maschinen zu entwickeln, die sich in einer Weise verhalten, die man beiMenschen als intelligent bezeichnen würde“ - John McCarthy (1955) - -## {.standout} - -> KI sind „Programme, die es ermöglichen, wahrzunehmen, logisch zu schließen und zu agieren.“ - Patrick H. Winston (1992) - -## {.standout} - -> „KI ist die Entwicklung mentaler Fähigkeiten durch die Nutzung von Computermodellen.“ - Eugene Charniak ‚und Drew McDermott (1985) - -## {.standout} - -> „KI ist die Automatisierung von Aktivitäten, die wir dem menschlichen Denken zuordnen, Aktivitäten wie beispielsweise Entscheidungsfindung, Problemlösung, Lernen [...]“ — Richard Bellman (1978) - -## {.standout} - -> „KI ist die Wissenschaft, die der Frage nachgeht, wie man Computer dazu bringen kann, Dinge zu tun, bei denen ihnen ‚momentan der Mensch noch überlegen ist.” — Elaine Rich und Kevin Knight (1991) - -## \only<1>{Weiter gehts!}\only<3>{Ich bin keine Katze!}\only<4>{Ich bin keine Roboter!} - -`\only<2->{`{=latex} -\vspace{-0.5cm} -![](img/Copyrighted/google-captcha-images.png){.center height=95%} -`}`{=latex} - -## CAPTCHA - -### \faIcon{lightbulb} Was heißt das eigentlich? -\pause -**c**ompletely **a**utomated **p**ublic **T**uring test to tell **c**omputers and **h**umans **a**part - -\pause -### Alan Turing -::: {.columns} -:::: {.column width=50%} -* Manchen eventuell bekannt aus *The Imitation Game* oder dem Klassenzimmer. -* Britischer Mathematiker, Kryptoanalytiker und Informatiker -:::: - -:::: {.column width=50%} -\vspace{-0.8cm} -![](img/alan_turing.jpg){.center height=75%} -:::: -::: - -## Turing Test - -::: {.columns align=center} -:::: {.column width=50%} -![Klassischer Turing Test](img/Copyrighted/turing_test.png) -:::: - -:::: {.column width=50%} -\large -Der Turing-Test beschreibt ein Verfahren, bei der ein Computerprogramm so agieren muss, dass es für eine Fragen stellende Person nicht von einem echten Menschen unterscheidbar ist. -:::: -::: diff --git a/Info/11/MUG_SWG_SG/4/KI_Klassifikation_Hefteintrag.pdf b/Info/11/MUG_SWG_SG/4/KI_Klassifikation_Hefteintrag.pdf deleted file mode 100644 index 567960fc..00000000 Binary files a/Info/11/MUG_SWG_SG/4/KI_Klassifikation_Hefteintrag.pdf and /dev/null differ diff --git a/Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex b/Info/11/MUG_SWG_SG/4/Perzeptron/handout.tex deleted file mode 100644 index f75c1cae..00000000 --- a/Info/11/MUG_SWG_SG/4/Perzeptron/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