home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1994 September
/
CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso
/
win3
/
programr
/
atre27.exe
/
ATREE_27
/
EXAMPLE4.LF
< prev
next >
Wrap
Text File
|
1992-08-01
|
3KB
|
95 lines
#
#
#---- example4.lf
#!!!! requires example3.lf to be run first !!!!
#
#
#---- This is an lf example that learns the OR
#---- function of two binary inputs by retraining trees
#---- trained previously on the AND function. Usually
#---- one will not retrain trees to another function, but
#---- instead to fine tune a tree's performance.
#
#---- Specify tree statements.
tree
#---- Train until we get 4 elements of the training set right
min correct = 4
#---- or until 30 epochs have passed.
max epochs = 30
#---- Load the trees from example3.tre
load tree from "example3.tre"
#---- Specify function statements.
function
#---- Domain dimension MUST be the first statement, followed
#---- by the codomain dimension statement.
domain dimension = 2
#---- There is only 1 codimension.
codomain dimension = 1
#---- Load encodings for use with example3.tre
load coding from "example3.cod"
#---- There are four rows in our training set.
training set size = 4
training set =
# A B A or B
1 1 1
1 0 1
0 1 1
0 0 0
#---- We will test on the following 4 vectors.
test set size = 4
test set =
# A B A or B
1 1 1
1 0 1
0 1 1
0 0 0
#---- The following output file should be generated:
#---- The first line indicates how many codomains there are.
#---- The next four lines represent each of the four lines in the test set.
#---- Each value is followed by its corresponding quantization number
#---- in the prescribed encoding scheme. Each codomain is followed
#---- by the corresponding result from the ALN's, along with its quantization
#---- number. Remember, it's not the calculated value that is as important
#---- as the calculated quantization level. You can get more accurate values
#---- by tightening up the encoding.
#---- After the results is the error histogram, which counts,
#---- for each of the codomains, the number of times the result quantization
#---- level differed from the actual quantization level by n. In this example,
#---- the ALN's executed the test set perfectly, so there are 4 counts for
#---- errors of n = 0 in the codomain.
# A B A or B A or B result
#1
#1.000000 1 1.000000 1 1.000000 1 1.000000 1
#1.000000 1 0.000000 0 1.000000 1 1.000000 1
#0.000000 0 1.000000 1 1.000000 1 1.000000 1
#0.000000 0 0.000000 0 0.000000 0 0.000000 0
#
#ERROR HISTOGRAM
#0 errors 4
#1 errors 0
#2 errors 0
#3 errors 0
#4 errors 0
#5 errors 0
#6 errors 0
#7 errors 0
#8 errors 0
#9+ errors 0