|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.BasicML
org.encog.neural.bam.BAM
public class BAM
Bidirectional associative memory (BAM) is a type of neural network developed by Bart Kosko in 1988. The BAM is a recurrent neural network that works similarly that allows patterns of different lengths to be mapped bidirectionally to other patterns. This allows it to act as almost a two-way hash map. During training the BAM is fed pattern pairs. The two halves of each pattern do not have to be the to be of the same length. However all patterns must be of the same overall structure. The BAM can be fed a distorted pattern on either side and will attempt to map to the correct value.
Constructor Summary | |
---|---|
BAM()
Default constructor, used mainly for persistence. |
|
BAM(int theF1Count,
int theF2Count)
Construct the BAM network. |
Method Summary | |
---|---|
void |
addPattern(MLData inputPattern,
MLData outputPattern)
Add a pattern to the neural network. |
void |
clear()
Clear any connection weights. |
MLData |
compute(MLData input)
Setup the network logic, read parameters from the network. |
NeuralDataMapping |
compute(NeuralDataMapping input)
Compute the network for the specified input. |
int |
getF1Count()
|
int |
getF2Count()
|
Matrix |
getWeightsF1toF2()
|
Matrix |
getWeightsF2toF1()
|
void |
setF1Count(int i)
Set the F1 neuron count. |
void |
setF2Count(int i)
Set the F2 neuron count. |
void |
setWeightsF1toF2(Matrix matrix)
Set the weights for F1 to F2. |
void |
setWeightsF2toF1(Matrix matrix)
Set the weights for F2 to F1. |
void |
updateProperties()
Update any objeccts when a property changes. |
Methods inherited from class org.encog.ml.BasicML |
---|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BAM()
public BAM(int theF1Count, int theF2Count)
theF1Count
- The F1 count.theF2Count
- The F2 count.Method Detail |
---|
public void addPattern(MLData inputPattern, MLData outputPattern)
inputPattern
- The input pattern.outputPattern
- The output pattern(for this input).public void clear()
public MLData compute(MLData input)
input
- NOT USED
public NeuralDataMapping compute(NeuralDataMapping input)
input
- The input to the network.
public int getF1Count()
public int getF2Count()
public Matrix getWeightsF1toF2()
public Matrix getWeightsF2toF1()
public void setF1Count(int i)
i
- The count.public void setF2Count(int i)
i
- The count.public void setWeightsF1toF2(Matrix matrix)
matrix
- The weight matrix.public void setWeightsF2toF1(Matrix matrix)
matrix
- The weight matrix.public void updateProperties()
updateProperties
in interface MLProperties
updateProperties
in class BasicML
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |