next up previous contents
Next: Bibliography Up: Basic Concepts Previous: Summary of this chapter

Exercises

These are intended to provoke thought. Nothing that makes people think can be all bad.

1.
Suppose you are given 1000 digitised images of trees and another 100 images of pin-up pictures of underclad women. It is known that these come from a source of such pictures which has them in that ratio. The images are stored in a computer in some format, and a supply of new images is about to be offered to the computer, each either an underclad woman or a tree, obtained from the same source. You have been consulted by the local Wimmynz Kollektiv to write a program that will delete the image file if and only if it is a picture of an underclad woman. Each image is 512 pixels square and is in full colour. Can you suggest plausible ways of representing the images as points in a suitable vector space so as to make the automatic discrimination of the two classes of image feasible? Which methods of classification would you consider most reasonable and why?

(Hint: Counting the number of pink or brown pixels might be a reasonable start. More complicated procedures could be necessary for pictures of trees taken in Autumn.)

2.
The points % latex2html id marker 939
$ \left(\begin{array}
{c} \ 2 
 \\  \ 2 \\  \ 2 \end{array} \right), 
\left(\begin{array}
{c} -2 \\  -2 \\  -2 \end{array} 
\right) $ are the good guys. The points

\begin{displaymath}
% latex2html id marker 584
\left(\begin{array}
{c} \ 2
\\  \...
 ...\left(\begin{array}
{c} -2 \\  -2 \\  \ 2 \end{array} 
\right) \end{displaymath}

are the bad guys. Is there a perceptron neural net such as Fig.1.6 which can discriminate the two kinds of guys?

3.
On a 3 by 3 array of pixels, we can draw horizontal bars consisting of white pixels (1) against a black (0) background by writing out the result of a raster scan of bits: thus the image of Fig.1.12 is coded as (0 0 0 1 1 1 0 0 0 ) and a vertical bar likewise might be represented as (0 1 0 0 1 0 0 1 0 ). Each of the three horizontal bars and the three vertical bars thus gets coded into a point in ${\fam11\tenbbb R}^9$. First convince yourself that a single unit neural net cannot distinguish vertical from horizontal bars. Now take three units with weights given by: (1 1 1 0 0 0 0 0 0 0), (0 0 0 1 1 1 0 0 0 0) and (0 0 0 0 0 0 1 1 1 0). Let the output of these units go into a `third layer' unit. What weights on the last unit will ensure that its output correctly tells horizontal from vertical bars? (Confirm that it cannot be done by any choice of weights.) If you are allowed two more units in the second layer, what choice of weights on these units and the third layer unit will ensure that horizontal can be told from vertical? Can any choice of weights on three units in the second layer guarantee a choice of weights on a single third layer unit which will do the job? Any suggestions?


 
Figure 1.13: 3 x 3 array of pixels with horizontal bar in middle.
\begin{figure}
\vspace{8cm}
\special {psfile=patrecfig12.ps}\end{figure}

4.
Someone gives you a set of about two hundred 11 by 9 pixel arrays on which have been drawn digits from 0 to 9, as in Fig1.14. There are several different examples of, say , a `1', in different locations in the grid, and so there are ten clusters each of twenty points in ${\fam11\tenbbb R}^{99}$, if you simply code the pixel arrays by doing a raster scan. There has to be a way of coding the points in a lower dimensional space. Find one. Find another. Analyse the advantages and disadvantages of these methods.

5.
Use a scanner on Fig.1.14 to get the image stored as a TIF file, then use a TIF reader program supplied to enrolled students to display it as an image on a PC or UNIX workstation. It is now stored as an array in the program. Write your own C program which includes the TIF reader as a procedure to obtain the image and use it to test your solutions to the last problem. If you cannot get access to a scanner, email your tutor for an ftp site with the data already scanned for you.


 
Figure 1.14: Digitised 11 by 9 images of digits
\begin{figure}
\vspace{6cm}
\special {psfile=patrecfig13.ps}\end{figure}


next up previous contents
Next: Bibliography Up: Basic Concepts Previous: Summary of this chapter
Mike Alder
9/19/1997