\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{graphicx} %BIlder einbinden
\usepackage{amsmath} %erweiterte Mathe-Zeichen
\usepackage{amsfonts} %weitere fonts
\usepackage[utf8]{inputenc} %Umlaute & Co
\usepackage{hyperref} %Links
\usepackage{ifthen} %ifthenelse
\usepackage{enumerate}
\usepackage{listings}
\lstset{language=Python}
\usepackage{ wasysym }
\usepackage{algpseudocode} %Pseudocode
\usepackage{dsfont} % schöne Zahlenräumezeichen
\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen
\usepackage{tikz} %TikZ ist kein Zeichenprogramm
\usetikzlibrary{trees,automata,arrows,shapes}

\pagestyle{empty}


\topmargin-50pt

\newcounter{aufgabe}
\def\tand{&}

\newcommand{\makeTableLine}[2][0]{%
  \setcounter{aufgabe}{1}%
  \whiledo{\value{aufgabe} < #1}%
  {%
    #2\tand\stepcounter{aufgabe}%
  }
}

\newcommand{\aufgTable}[1]{
  \def\spalten{\numexpr #1 + 1 \relax}
  \begin{tabular}{|*{\spalten}{p{1cm}|}}
    \makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline
    \rule{0pt}{15pt}\makeTableLine[\spalten]{}\\
  \end{tabular}
}

\def\header#1#2#3#4#5#6#7{\pagestyle{empty}
\begin{minipage}[t]{0.47\textwidth}
\begin{flushleft}
{\bf #4}\\
#5
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\begin{flushright}
#6 \vspace{0.5cm}\\
%                 Number of Columns    Definition of Columns      second empty line
% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm}
\aufgTable{#7}
\end{flushright}
\end{minipage}
\vspace{1cm}
\begin{center}
{\Large\bf Sheet #1}

{(Hand in #3)}
\end{center}
}



%counts the exercisenumber
\newcounter{n}

%Kommando für Aufgaben
%\Aufgabe{AufgTitel}{Punktezahl}
\newcommand{\Aufgabe}[2]{\stepcounter{n}
    \textbf{Exercise \arabic{n}: #1} (#2 Points)}


\begin{document}
    %\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben}
    \header{9}{}{2015-07-09}{Intelligent Systems I}{\textit{Maximus Mutschler}\\ \textit{Jan-Peter Hohloch}
    }{SS 15}{2}
    \vspace{1cm}
    \Aufgabe{Independence}{50}\\
        \includegraphics[width=0.49\textwidth]{regression.png}
        \includegraphics[width=0.49\textwidth]{residuals.png}\\
        For small values of Y it is overestimated, for larger underestimated. For small X we predict small Y, however there's noise. This leads to the dense population of residuals on y=x.\\
        Due to the qudratic connection there are more data near zero for a uniformly distributed X than there are further to larger values.\vspace{1cm}\\
    \Aufgabe{Kernels}{50}
        \begin{enumerate}
            \item $k(x_1,x_2)=C= \alpha \cdot k'(x,y)\\
            k'(x,y)=1 \begin{pmatrix}
            x &y
            \end{pmatrix} \begin{pmatrix}
            1 &1\\1&1
            \end{pmatrix}\begin{pmatrix}
            x\\y
            \end{pmatrix}= x^2+2xy+y^2=(x+y)^2 \geq 0 \forall{x,y}$\checkmark
            \item $k(x,y) =xy$\\
             $<x,y>$ is a kernel according to lecture\checkmark
            \item No kernel $k(x,y) =\dfrac{1}{2}(x+y)\\
            k(-1,-1) =-1 \ngeq 0\\$
            But for a Kernel ist has to hold:\\
            $k(x,x) \geq 0 \forall{x} $\lightning
            \item $k(x,y) = 5x^Ty = 5 \cdot k'(x,y)$ with $k'(x,y) = x^Ty =<x,y>$\\
            $= \alpha *k'(x,y)$ where $\alpha =5$\checkmark
            \item $k(x,y)=(x^Ty+1)^2= (k_1(x,y)+k_2(x,y))^2$\\
            where $k_1(x,y)=x^Ty, k_2(x,y)=1$\\
            $k_1$ and $k_2$ are proven as kernels in task 2 and 1 and summing and multiplying is allowed for kernels. So 5. is also a kernel.\checkmark
        \end{enumerate}
\end{document}

