In this homework you will use Terry Regier's program to learn spatial relation terms. You should read the text through Chapter 6 before starting this exercise.
If you have never used UNIX before, or are unsure about some of the basic commands, please e-mail bbergen@icsi.berkeley.edu.
To get started on the assignment, you will need to get and install a copy of the program in your directory. To do this you should:
1) Login to a PC machine running Solaris in Room 275 or 277 Soda
(Othee Soda and Cory machines are not suitable for this assignment; if you have telnet and x-windows at home (if you can run x-windows graphics remotely), you may run this from home by remotely logging into one of the machines in rooms 275-277, like piero.cs or bombay.cs).
2) copy the program space.tar to your directory.
(type "cp /home/ee/cs182/space.tar .")
Note: if at some point in the process you get a message saying that you are over the disk quota, you should erase some of your previous files from the account, such as the .netscape/cache files.
3) type "tar -xf space.tar" in your directory to install the program.
4) type "cd NonPunctate" to get to the static scene learning directory. You will mainly be working in this directory.
5) Type "more ReadMe" and read the instructions on running the program. The essential ones are repeated in the questions below.
6) Do the following things, and answer the following questions.
Each spatial relation term corresponds to a spatial "concept". A concept is composed of a set of possible "scenes". When given a set of scenes that correspond to a concept (say the "above" concept), the program is able to learn to label appropriate scenes with the spatial term ("above").
To view the scenes that are used to train the program to learn the relation "above", type:
do see above
To view the scenes that are used for negative evidence in training or for later testing type, respectively:
do see above-neg
do see above-test
Do the same for the terms "near", "below", "in", "on", "right", "left", and "out". To do this you use the same command with the corresponding term. For instance, to view the scenes for "in", you will type
do see in
The scenes from the last part are used to train the program to distinguish between the different spatial terms. This is done by the program "train". To train the program to learn "above", type
do train above
When the program asks you for the number of epochs, if you are satisfied with the error (the number of bits wrong is low, and the value is small) then you can stop the program by specifying "0" to the question:
Enter number of epochs to train: 0
If you are unsatisfied with the error and want to continue training enter 50 to the question
Enter number of epochs to train: 50
When you enter "0" to the question above, the program automatically displays the results of the training. The number at the bottom of each scene in the display tells you how strongly the program classified the scene as belonging to the relevant concept. For instance a value of "0.9999999" on a scene for above means that the system has classified that scene as a very good instance of "above". A value of "0.0000001" on the other hand indicates that the program has classified the scene ss not "above".
When you have looked at the trained data, type "cntrl-c" on the terminal. You will now see the trained data for the negative examples of the same concepts. Type "cntrl-c" again when you are done looking at these.
You will be asked if you want to save the weights. Answer "yes" by entering "1" to the following:
Want to dump weights [0=>no, 1=>yes]? 1.
At this point the network has been trained to recognize "above" and can be tested on previously unseen scenes of above.
Your job is to train the program on as many as possible of the following words until you are satisfied that the program has learned them correctly. If some words are unlearnable because the system doesn't have the needed feaures, you can save a lot of effort by not trying these examples, and explaining what makes them unlearnable.
"above", "around", "bigger", "black", "enclose", "in", "left", "near", "on", "out", "overlap", "right", "smaller", "touching", "through", "white".
To train the program on a particular word (say "in") just replace "above" with the specific word ("in"). For instance
do train in
trains the scenes for "in" for "100" epochs.
Explain the results of your training.
To test the program on unseen examples of "above", type
do test above
Make sure you have trained the netowork and saved the weights of the training as explained in Part 2.
Test the network you trained on all the examples
in Part 3. Explain the results. Did the program perform as you expected
on each of the cases. If not, why do you think not. Specifically, explain
the results for those terms which could not correctly be learned by the
program.
This assignment is due on Monday, March 15