cse 473 spring 2006
Assignment 5: Neural Networks
Turn in hardcopy in class on May 10th
This assignment may be done either individually or in teams of two students, your choice. If done in a team, turn in just one copy of the solution with both student names on it.
The assignment is to create a neural network character recognizer, that can distinguish at least 4 different lowercase letters. You will design the structure of the neural network by hand using sigmoid units, and then learn the weights for the network using the sigmoid training rule and (if you create a multi-layer network) backpropagation. Use Joone (Java Object Oriented Neural Engine) to implement your solution. Assignment details:
- Begin by creating a training data set of 10 examples of each of 4 letters of your choice. The resolution of the letters should be 5 pixels wide by 6 pixels high, with black and white (0 or 1) pixels. An easy way to create the training data is to use a simple paint program at a very high zoom level to create a bitmap for each example. Then write a simple C program to convert a bitmap into a 30 element array in a format that Joone can accept as input data.
- Start by building a single-layer perceptron network. The (file) input layer should read from the files containing the training data. Then have an output layer of 4 neurons. Take the interpretation of a piece of data to be the output neuron with the highest value. For training, the target for each piece of data is a vector of length 4 containing a single 1 and three zeros.
- Train and test using what is called cross validation. Do the following 10 times:
- Train the network using 9 examples of each of the 4 letters.
- Test the network using the 4 remaining examples.
- Repeat using a different set of 36 examples.
Then take the percentage correct over all 10 runs to be the accuracy of the system.
- Write up a short report (1 to 2 pages long) summarizing your experiments and the results, and attach a print out of the neural network.
- Note that the Joone Complete Guide includes an example of a neural network for character recognition that uses a different kind of neural network called a "self organizing map" (SOM). You can refer to the tutorial to help figure out how Joone works, but do not implement the SOM solution. As stated above, implement either a single or multi-layer perceptron network.
- Doing all the above very well will give you a score of 100%. For extra credit, experiment with some of all of the following, and include a discussion in your report on what worked and what didn't:
- Use a higher resolution.
- Recognize a larger set of different letters.
- Use grayscale rather than monochrome pixels.
- Implement a 2-layer perceptron network. Try different numbers of hidden units.