Professional Version Basis of AI Backprop Hypertext Documentation

Copyright (c) 1990-97 by Donald R. Tveter

Patterns

This menu window contains a number of different commands to deal with patterns.

Pattern Input Formats

The programs are able to read pattern values in two different formats. Real numbers follow the C language notation and must be separated by a space. The letters `H' and 'h' used in recurrent networks is also allowed. The letter `x' (the unknown) with a default value of 0.5 is also allowed. Real input format is the default.

The other format is the compressed format, a format consisting of 1s, 0s and the letters `x', 'h' and `H'. In compressed format each value is one character and it is not necessary to have blanks between the characters. For example, in compressed format the patterns for xor could be written out as:

101
000
011
110
Clicking the "Input Format" button will change the format to its other value. The typed commands are:

f ir     * input real
f ic     * input compressed

Problem Types

There are two different types of problems that back-propagation can handle, the general type of problem where every output unit can take on an arbitrary value and the classification type of problem where the goal is to turn on output unit i and turn off all the other output units when the pattern is of class i. The xor problem is an example of the general type of problem. For an example of a classification problem, suppose you have a number of data points scattered about through three-dimensional space and you have to classify the points as either class 1, class 2 or class 3. For a pattern of class 1 you can always set up the output: "1 0 0", for class 2: "0 1 0" and for class 3: "0 0 1", however doing the translation to bit patterns can be annoying so another notation can be used. Instead of specifying the bit patterns click the "Problem Type" button to classification and then the program will read data in the form:

   1.33   3.61   1   *  shorthand for 1 0 0
   0.42  -2.30   2   *  shorthand for 0 1 0
  -0.31   4.30   3   *  shorthand for 0 0 1
and translate it to the bit string form. Another benefit of the classification format is that when the program outputs a status line it will also include the percentage of correct patterns based on the maximum value rather than just on tolerance. The typed commands are:

f pg     * the general type of problem
f pc     * the classification type of problem

The Reading Patterns Buttons

The purpose of the next three buttons are:

Read Training Set Patterns        rt filename  * rt for read training
Read More Training Set Patterns   rx filename  * rx for read extra
Read Test Set Patterns            tf filename  * tf for test file

The Printing Buttons

One row of buttons prints out training set pattern material, either a summary of the training status, the whole list of output values for the patterns, one pattern value, one target value or the confusion matrix for a classification problem. A second row of buttons does the same for test set patterns. The thrid set applies to the recurrent classification training set. The fourth set applies to the recurrent classification test set. The typed commands look like:

p0     * prints a summary of training set status
p      * evaluates and prints the training set patterns
p 5    * prints the network output for training pattern 5
pt 5   * prints the target values for training pattern 5
pm     * confusion matrix for a classification problem

t0     * prints a summary of test set status
t      * evaluates and prints the test set patterns
t 5    * prints the network output for test pattern 5
tt 5   * prints the target values for test pattern 5
tm     * confusion matrix for a classification problem

u0     * prints a summary of training set status
u      * evaluates and prints the training set patterns
u 5    * prints the network output for training pattern 5
ut 5   * prints the target values for training pattern 5
um     * confusion matrix for a classification problem

v0     * prints a summary of test set status
v      * evaluates and prints the test set patterns
v 5    * prints the network output for test pattern 5
vt 5   * prints the target values for test pattern 5
vm     * confusion matrix for a classification problem

The Odd Recurrent Network Tests

Once upon a time I was wondering what would happen if the poetry network learned its verses and then the program was given several words in the middle of the verses. Would it pick up the sequence and be able to complete it given 1 or 2 or 3 or n words? So given for example, the short sequence "for i doubt" will it be able to "get on track" and finish the verse? To test for this there are an extra pair of commands, tr and trp. Given a test set (which should be the training set) they start at every possible place in the test set, input n words and then check to see if the net produces the right answer. For this example I tried n = 3, 4, 5, 6 and 7 with the following results:

[ACDFGMNPQTW?!acdefhlmopqrstw]? tr 3
 TOL:  81.82 %  ERROR: 0.022967
[ACDFGMNPQTW?!acdefhlmopqrstw]? tr 4
 TOL:  90.48 %  ERROR: 0.005672
[ACDFGMNPQTW?!acdefhlmopqrstw]? tr 5
 TOL:  90.00 %  ERROR: 0.005974
[ACDFGMNPQTW?!acdefhlmopqrstw]? tr 6
 TOL: 100.00 %  ERROR: 0.004256
[ACDFGMNPQTW?!acdefhlmopqrstw]? tr 7
 TOL: 100.00 %  ERROR: 0.004513
So after getting just 3 words the program was 81.82% right in predicting the next word to within the desired tolerance. Given 6 or 7 words it was getting them all right. The trp command does the same thing except it also prints the final output value for each of the tests made.