\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\graphicspath{{eps/}{pdf/}}
\pagestyle{empty}
\oddsidemargin 2.1mm
\textwidth     155mm
\topmargin     -15mm
\textheight    240mm

\def\net{\mathop{\rm net}\nolimits}

\begin{document}

%-----------------------------------------------------------------------

\noindent
{\bf Artificial Neural Networks and Deep Learning}
\hfill Summer 2018 \\
Christian Borgelt and Christoph Doell \hfill from 2018.07.03

%-----------------------------------------------------------------------

\vskip3ex
\centerline{\bf Exercise Sheet 9}

%-----------------------------------------------------------------------

\subsubsection*{Exercise 35 \quad\rm Radial Basis Function Networks:
                                     Binary Functions}

Determine the parameters (weights~$\vec{w}_u$ and radii~$\sigma_u$)
of radial basis function networks with the activation function
\[ f_{\rm act}^{(u)}(\net_u, \sigma_u) =
   \left\{\begin{array}{ll}
   1, & \mbox{if $\net_u \le \sigma_u$,} \\
   0, & \mbox{otherwise,}
   \end{array}\right. \]
for the neurons in the hidden layer, that produce the value~1 for
points inside the gray areas of the diagrams shown below and the
value~0 outside! It does not matter whether the networks produce
a value of~0 or a value of~1 for points on the boundaries of the
gray areas. However, you should make sure that for eavery point in
the $x_1$-$x_2$ plane {\em either\/} a value of~0 {\em or\/} a
value of~1 is computed.
\begin{center}\unitlength1mm
\begin{picture}(145,29)
%\multiput(0,0)(145,0){2}{\line(0,1){29}}
%\multiput(0,0)(0, 29){2}{\line(1,0){145}}
\put(  0,29){\makebox(0,0)[lt]{a)}}
\put(  5, 0){\includegraphics{nnex-06}}
\put( 50,29){\makebox(0,0)[lt]{b)}}
\put( 55, 0){\includegraphics{nnex-07}}
\put(100,29){\makebox(0,0)[lt]{c)}}
\put(105, 0){\includegraphics{nnex-08}}
\end{picture}
\end{center}

%-----------------------------------------------------------------------

\subsubsection*{Exercise 36 \quad\rm Radial Basis Function Networks:
                                     Function Approximation}

\begin{enumerate}\itemsep0pt
\item[a)] Construct a radial basis function network with about
     10~neurons that approximates the function $y = x^2$ in the interval
     $[0.5,4.5]$ by a step function!
\item[b)] How can the approximation be improved?
     (State at least two possibilities.)
\end{enumerate}

%-----------------------------------------------------------------------

\subsubsection*{Exercise 37 \quad\rm Radial Basis Function Networks:
                                     Initialization}

Using the method of the (Moore--Penrose) pseudo-inverse, determine the
parameters (weights~$\vec{w}_u$ and bias values~$\theta_u$) of radial
basis function networks that compute the conjunction $x_1 \wedge x_2$!
Employ
\begin{enumerate}\itemsep0pt\parskip0pt
\item[a)] two radial basis functions mit centers~$(0,0)$ and $(1,1)$,
\item[b)] one radial basis function with center~$(1,1)$.
\end{enumerate}
All basis functions should have the radius~$\frac{1}{2}$.
The hidden neurons should have the Euclidean distance as their
network input function and a Gaussian function
\[ f_{\rm act}({\rm net}_u, \sigma_u)
   = e^{\textstyle -\frac{{\rm net}_u^2}{2\sigma_u^2}} \]
as their activation function. Compute the actual output of the two
networks and compare it to the desired outputs! Why do we obtain
a perfect solution of the learning problem in part~a)?

%-----------------------------------------------------------------------

\subsubsection*{Exercise 38 \quad\rm Radial Basis Function Networks:
                                     Initialization}

Using the method of the (Moore--Penrose) pseudo-inverse, determine the
parameters (weights~$\vec{w}_u$ and bias values~$\theta_u$) of radial
basis function networks that compute the Exclusive Or
$x_1 \;\dot{\vee}\; x_2$ (or $x_1 \oplus x_2$)! Employ
\begin{enumerate}\itemsep0pt\parskip0pt
\item[a)] two radial basis functions mit centers~$(0,0)$ and $(1,1)$,
\item[b)] one radial basis function with center~$(1,1)$.
\end{enumerate}
All basis functions should have the radius~$\frac{5}{4}$.
The hidden neurons should have the city block distance (also known
as Manhattan distance) as their network input function and a triangular
function as their activation function. Compute the actual output of the
two networks and compare it to the desired outputs!

%-----------------------------------------------------------------------

\end{document}
