CS 448 -- Fall 2011 -- Lab 1, Due 9/9/2011
A simple learning system: Perceptron.
For this lab you will implement a perceptron to learn to categorize input patterns as either a particular letter or not.
Phase 1: prototype
Implement a prototype that reads in, stores, and allows the user to view, all the input patterns from a directory.
There are three directories in
http://www.willamette.edu/~levenick/cs448/labs/ptronData.zip, unzip them in any convenient directory. Unfortunately, they are different sizes and different formats;
think of them as a found artifact and design your input code so that it gracefully deals with them (it should train on all of them, but sequentially; i.e. first one, then then second, then the third).
Requirements
- Write a Ptron class which reads and stores all the patterns from all three directories.
Create your GUI in a Frame, and remember to setBounds(800, 800) and setVisible(true) in the constructor or you can't see it!
Embed the pathname for the input files in your code. (Remember to use a complete pathname
(in case you haven't worked with files in Java for a while, use front-slashes in the pathname or double back-slashes, single back-slashes in Strings make the next character special)).
- Use your Pattern and PatternList from Lab 0. Modify Pattern so that it stores the correct categorization as well as the pattern
- For testing purposes, include a Button and TextArea; when the user pushes the Button, display the next pattern in the TextArea.
Phase 2: Working ptron - demo before 3 p.m. on 9/9
Implement the learning algorithm; train it until it gets all the patterns right. Output enough info so that you can see how it's doing
(like how many correct/incorrect categorizations on each pass through the data). Experiment with different ratios between eta and theta. Do they all work?
How to get credit
Demonstrate your program before 3 p.m. on 9/9 -- no credit after the due date!