Neural Networks Assignment
Self Organising Maps

Student: Daniel Trembath
StudentID: 1232088

Headings in this readme file:
--WHAT THIS PROGRAM DOES
--HOW TO START THIS PROGRAM
--HOW TO SELECT YOUR TRAINING/TESTING DATA
--HOW TO SETUP YOUR MAP PARAMETERS
--HOW TO TRAIN YOUR MAP  //at least read me
--HOW TO TEST YOUR MAP

___________________________
WHAT THIS PROGRAM DOES:

This is a small graphical Java application that will read in data from two text files (the Training and Testing file) and create a Kohonen map of the training data and set a number of training parameters. Your data can have as many dimensions (values) as you please but it must be label so that the program can test the accuracy of the map.

The program has a GUI that lets you control and run everything in the program. The interface uses Java 2's swing components so you'll need a relatively recent Java Runtime Environment installed, but that's about every computer at Swinburne so I think it should run ok.

______________________________
HOW TO START THIS PROGRAM:

The directory you found this ReadMe.txt in should have:
--Assignment Discussion.doc and Assignment Results.xls
--nn_assignment.jar
--EmergencyStart.bat
...and some data files in the TrainingAndTestData folder

a) If you have java installed you should be able to just double-click on the   nn_assignment.jar file.
b) If that doesn't work you should be able to just double-click on   EmergencyStart.bat.
c) If even that doesn't work you should swear at java then...

The package name is:      nn_assignment
The main class name is:   SOMDemonstration
So this command line should work:
c:\>/path-to-your-java-exe/java.exe -cp /path-to-my-jar-file/nn_assignment.jar  nn_assignment.SOMDemonstration
eg
c:\>java -cp /temp/123208/nn_assignment.jar nn_assignment.SOMDemonstration

You should get a nice GUI about 500x550 pixels. You can resize it like a normal window if its too big.
To quit the program goto the 'File' menu and click 'Exit'.

______________________________________________
HOW TO SELECT YOUR TRAINING/TESTING DATA

File format is the same as the sample IRIS data provided. You are not restricted to four input values, you can have as many as you like just make sure the last one is the data label. All data must be labelled!

Just click the buttons marked 'Find Training File' and 'Find Testing File'.

You will be shown a file prompt to locate each file. Their file-paths will be shown in the text box's next to the buttons. Or you can just type the path into those boxes if you know where your files are.

_______________________________________
HOW TO SETUP YOUR MAP PARAMETERS

Using the text boxes at the top of the window you can set the:
--Size of the Map		(default it is set to 10, ie 10x10 wieghts nodes)
--Number of training cycles	(default is set to 500 cycles)
--The initial Learning rate	(default is 0.4)
--The initial Learning radius as a fraction of the map size	(default is a third, 0.3)

The learning rate and radius will decrease by .001 each cycle to a minimum Learning rate of 0.01 and minimum radius of 1.0 (one node). I didn't put in boxes to let you change these (should have), but you can change them at aprox line 50 in KohoenMap.java. 

_________________________
HOW TO TRAIN YOUR MAP

Once you have selected a training file and set your map parameters just click the button that says 'Train Map'.

At the bottom of the window you will see the map evolve as the program cycles through your data. (Note: we're only seeing the first two demensions of the data!). All of the weight nodes are shown as blue dots and the logical links in gray. 

By default the program will show you the map after each training cycle. You can change this at any time by clicking on the tick boxes marked 'Each Step?' and 'Each Cycle?' at the top of the window. Untick both to NOT draw the map at all.

If you select 'Each Step?' you will see the map after every record that is trained. This is a good way to see what's actually going on. The blue X and a red O drawn on the map show the position of the training record relative to the map, and the 'Winning' node in the weights array. Graphics updates slow down training A LOT! Only tick them when you want to look at the pretty graph.

While the map is training you can disable the node links or grid lines by clicking on the tick boxes at the top right. 

________________________
HOW TO TEST YOUR MAP

Once you have trained your map to a point where you would like to test it (you don't have to wait for training to finish), simply click on the button marked 'Test Map'. Make sure you have already selected your testing data or the button will be disabled!

Once testing has finished (this should only take a fraction of a second) a message box will pop up and tell you the parameters of the map you've just tested as well as the error totals.

Each and every time you test your map the results are stored (as long as it is still running). You can see your testing history at any time by going to the 'File' menu and selecting 'Show History'. This was a last minute bolt-on so the results do not scroll. If you wish to clear the history you can do so going to the 'File' menu and selecting 'Clear History'.


Cheers

Daniel