|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.wlu.cs.levy.RAAM.RAAM
Pollack's Recursive Auto-Associative Memory using SNARLI. Based on
@Article{Pollack90, author = {Pollack, J.B.}, title = {Recursive distributed representations}, journal = {Artifical Intelligence}, year = {1990}, volume = {36}, pages = {77-105} }This version of RAAM differs from Pollack's in using a terminal test based on proximity to dictionary entries, rather than an absolute threshold.
Constructor Summary | |
RAAM(int nhid,
int arity)
Creates a RAAM encoder/decoder network with specified number of hidden units. |
|
RAAM(int nhid,
int arity,
long seed)
Creates a RAAM encoder/decoder network with specified number of hidden units. |
|
RAAM(int nhid,
int arity,
java.util.Random rand)
Creates a RAAM encoder/decoder network with specified number of hidden units. |
Method Summary | |
edu.wlu.cs.levy.RAAM.Tree |
decode(double[] code,
edu.wlu.cs.levy.RAAM.Vectionary dict)
Decodes a fixed-size vector to a tree. |
double[] |
encode(edu.wlu.cs.levy.RAAM.Tree tree,
edu.wlu.cs.levy.RAAM.Vectionary dict)
Encodes a tree to a fixed-size vector. |
double[][] |
getDecoder()
Returns decoder weights, biases as IFS (one row per transform) |
void |
train(edu.wlu.cs.levy.RAAM.Tree[] trees,
edu.wlu.cs.levy.RAAM.Vectionary dict,
int nep,
double eta,
double mu,
int report)
Trains the RAAM network on a set of trees. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RAAM(int nhid, int arity)
nhid
- number of hidden unitsarity
- fixed tree aritypublic RAAM(int nhid, int arity, long seed)
nhid
- number of hidden unitsarity
- fixed tree arityseed
- seed for random-number generatorpublic RAAM(int nhid, int arity, java.util.Random rand)
nhid
- number of hidden unitsarity
- fixed tree arityrand
- random-number generatorMethod Detail |
public void train(edu.wlu.cs.levy.RAAM.Tree[] trees, edu.wlu.cs.levy.RAAM.Vectionary dict, int nep, double eta, double mu, int report) throws java.lang.IllegalArgumentException
trees
- trees to learndict
- dictionary mapping from terminals to fixed-size arraysnep
- number of epochseta
- learning ratemu
- momentumreport
- epochs between error reports
java.lang.IllegalArgumentException
- if trees aren't binary
java.lang.IllegalArgumentException
- if size of any dictionary entry
mismatches number of hidden unitspublic double[] encode(edu.wlu.cs.levy.RAAM.Tree tree, edu.wlu.cs.levy.RAAM.Vectionary dict) throws java.lang.IllegalArgumentException
tree
- tree to encodedict
- dictionary mapping from terminals to fixed-size arrays
java.lang.IllegalArgumentException
- if tree isn't binary
java.lang.IllegalArgumentException
- if size of any dictionary entry
mismatches number of hidden unitspublic edu.wlu.cs.levy.RAAM.Tree decode(double[] code, edu.wlu.cs.levy.RAAM.Vectionary dict) throws java.lang.IllegalArgumentException
code
- fixed-size vector encodingdict
- dictionary mapping from terminals to fixed-size arrays
java.lang.IllegalArgumentException
- if size of code or dictionary entry
mismatches number of hidden unitspublic double[][] getDecoder()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |