This distribution contains Scheme source code for the AMA learning
system described in the paper "Specific-to-General Learning for
Temporal Events with Application to Learning Event Definitions from
Video ". Also included is the data set used for the reported
experiments and instructions for reproducing those experiments.

				 CONTENTS

1)  bin/  
    
    A directory containing a Linux executable of the AMA learner.

2)  source/ 

    A directory containing the Scheme source code for the AMA learner.

3)  data-m19nov2001/  

    A directory containing the 210 force-dynamic models used in our
    learning experiments. These models were created by running Leonard
    on 210 videos, 30 videos for each of 7 event types (as described
    in the paper).

4)  definitions/

    A directory containing the 2 sets of hand-written definitions
    described in the paper, as well as AMA definitions that were
    learned from all of the data.

5)  experiments-in-paper/

    Contains the output of the experiments reported in the paper. 
    Instructions for reproducing this output are given below.

				 INSTALLATION

The executable program in bin/ was compiled under Linux 2.4.17. If
this executable does not work for you, then you can compile the
program according to following instructions. So far we have not tested
the program on other operating systems and architectures. 

Before you install the AMA learning system your must first install
Infrastructure, which you can obtain by anonymous FTP from
ftp://ftp.ecn.purdue.edu/qobi/infrastructure.tar.Z, and QobiScheme,
which you can obtain by anonymous FTP from
ftp://ftp.ecn.purdue.edu/qobi/QobiScheme.tar.Z.  To compile the
system, first unpack the distribution:

% uncompress ama.tar.Z
% tar xvf ama.tar
% cd ama/source

Then do the following: 

% make port
% cd `architecture-path`
% make install

This will result in an executable file named ama. 

			RUNNING THE AMA LEARNER

The executable ama has two primary modes. The first is used to output
learned AMA event defintions. The second is used to evaulate the
learner using leave-one-out cross-validation with training set
sampling as described in the paper.

OUTPUT LEARNED DEFINITIONS:

To output the learned definitions from Appendix C in the paper, use
the following command.

   ama -learn-defs output -data ./data-m19nov2001 -bn -k 3 -k 3 -k 3 -k 3
   -k 3 -k 3 -k 3

'-learn-defs output' indicates that we wish to learn definitions of
the seven event-types and output those definitions to the file
'output.definitiions'.

'-data ./data-m19nov2001' indicates that the force-dynamic models from
which to learn are in the './data-m19nov2001' directory. 

'-bn' indicates that the learner should use 'boundary negation' as the
negation mode. Other possibilites are '-n' for 'negative' negation mode
and '-p' for 'positive' negation mode. The meaning of these modes is
described in the paper. 

'-k 3' indicates that the learner will ouput 3-AMA definitions (each
timeline is limited to length 3). A value of k is specified for each
of the 7 event-types in the order of: pickup, putdown, stack, unstack,
move, assemble, disassemble.

CROSS VALIDATION

The following commands are used to produce the data for Table 1 in the
paper. 

   ama -sample-l1o bn-k2-l1o-t10-s29 -sample-size 29 -trials 10 -bn
   -k 2 -k 2 -k 2 -k 2 -k 2 -k 2 -k 2

   ama -sample-l1o bn-k3-l1o-t10-s29 -sample-size 29 -trials 10 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k4-l1o-t10-s29 -sample-size 29 -trials 10 -bn
   -k 4 -k 4 -k 4 -k 4 -k 4 -k 4 -k 4

   ama -sample-l1o p-k3-l1o-t10-s29 -sample-size 29 -trials 10 -p
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o n-k3-l1o-t10-s29 -sample-size 29 -trials 10 -n
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

'-sample-l1o output' indicates that we should perform leave-one-out
cross-validation and output the results to output.stats and
output.leonard. 

    output.stats contains the false positive and false negative rates
                 for each trial and ends with the overall/average
                 false positive and negative rates for the seven event
                 types in the order of: pickup, putdown, stack,
                 unstack, move, assemble, disassemble.

    output.leonard contains the detailed results of using the learned
                   definitions to classify events.   

'-sample-size n' indicates that the training-set sample size (as
described in the paper) is n.

'-trials n' indicates that the number of leave-one-out trials is n.

'-bn' or '-p' or '-n' indicates the negation mode as described
earlier.

'-k 3' has the same meaning as describe earlier. 

Finally the following commands can be used to generate data for Table
2 in the paper.

   ama -sample-l1o bn-k3-l1o-t10-s5 -sample-size 5 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k3-l1o-t10-s10 -sample-size 10 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k3-l1o-t10-s15 -sample-size 15 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k3-l1o-t10-s20 -sample-size 20 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k3-l1o-t10-s25 -sample-size 25 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

   ama -sample-l1o bn-k3-l1o-t10-s29 -sample-size 29 -trials 20 -bn
   -k 3 -k 3 -k 3 -k 3 -k 3 -k 3 -k 3

                               

