Prof. R. Williams
	

		   OVERVIEW OF DIRECTORY CONTENTS
		   AND HOW TO USE THESE PROGRAMS

This directory contains data files and programs for 3 different approaches
to learning from examples:

Decision Tree
Perceptron Network
Backprop Network

They are all designed to work on training data given in a common format,
although not all data files will work with all 3 programs.

Program Capabilities
---------------------
			   Input	    Output (discrete only)
		    discrete continuous multi-class multi-dimensional
		    -------- ---------- ----------- -----------------
Decision Tree         yes      no         yes           no
Perceptron Network    yes      yes        yes           yes
Backprop Network      yes      yes        yes           yes


Program Files
--------------
decision-tree.lisp
perceptron.lisp
backprop-net.lisp

learn-utils.lisp
nnet-utils.lisp

Compile and Load Files
----------------------
compile-learn-progs.lisp
load-learn-progs.lisp

To compile all programs, evaluate (load "compile-learn-progs")
To load	all programs, evaluate (load "load-learn-progs")


USER ROUTINES ACROSS ALL PROGRAMS
---------------------------------
define-training-data input-ranges output-ranges training-data

	Specifies valid values for input and output attributes
	and lists examples to be used for training.  Ordinarily
	included as part of a data file to be loaded at the
	desired time.  See data files for examples of how the
	arguments are specified.

show-training-data

	Displays the data currently loaded.

show-ranges

	Displays valid ranges for input and output attribute values.

USER ROUTINES BY PROGRAM
------------------------

Decision Tree
-------------
init-decision-tree

	Prepares training data for the decision tree program.

train-decision-tree

	Builds decision tree for classifying all training examples.

test-decision-tree input-att-vec

	Allows user to specify an input attribute vector to be
	classified according to the decision tree.

	Sample call: (test-decision-tree '(sunny mild high strong))

show-decision-tree

	Displays the decision tree.

Perceptron
----------
init-perceptron

	Prepares training data for the perceptron program, determines
	mappings of input and output attribute values to units, and
	constructs the network with all weights equal to zero.

train-perceptron &optional (max-passes 1000)

	Cycles through data and trains the perceptron network.
	Stops when all data learned or after max-passes passes
	through the data.

test-perceptron input-att-vec

	Allows user to specify an input attribute vector to be
	classified by the perceptron network.

	Sample call: (test-perceptron '(sunny mild high strong))

show-perceptron-weights

	Displays the current values of the perceptron weights.

show-neural-net-representation

	Displays the correspondence between network units and attribute
	values for both input and output.

*show-perceptron-detail*

	Global parameter.  When set to t, program displays the detailed
	weight change steps of the perceptron algorithm.  Initial value
	is nil.


Backprop Net
------------
init-backprop-net &optional (nbr-hidden-units 2)

	Prepares training data for the backpropagation program, determines
	mappings of input and output attribute values to units, and
	constructs a network with this number of input and output units
	and the specified number of hidden units.  Initializes all weights
	to small random values (chosen uniformly from [-0.5,0.5]).

train-backprop-net &optional (learn-coeff 0.5) (max-passes 5000)

	Cycles through data and trains the backpropagation network.
	Stops when all data learned to within the desired tolerance
	or after max-passes passes through the data.

test-backprop-net input-att-vec

	Allows user to specify an input attribute vector to be
	classified by the backpropagation network.

	Sample call: (test-backprop-net '(sunny mild high strong))

show-backprop-weights

	Displays the current values of all weights in the network.

show-neural-net-representation

	Displays the correspondence between network units and attribute
	values for both input and output.

*display-interval*

	Global parameter determining how many passes through the
	training data occur between displays of RMS error information.
	Initial value is 100.

*tolerance*

	Global parameter determining how close to the desired values
	all output values must be before successful termination.
	Initial value is 0.1.


General Remarks:

1. Whenever a new set of training data has been loaded using
   define-training-data it is necessary to call init-... to be sure that
   the corresponding program interfaces to it properly.

2. These programs are designed to be loaded into Lisp at the same time and
   will not interfere with each other.  One or more of them can thus be
   run in the same Lisp environment to obtain a side-by-side comparison
   of their behavior on the same data set.

3. Numbering of attributes, nodes, etc. is zero-based, consistent with the
   standard Lisp convention.