|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.jaer.projects.hopfield.matrix.HopfieldNetwork
public class HopfieldNetwork
HopfieldNetwork: This class implements a Hopfield neural network. A Hopfield neural network is fully connected and consists of a single layer. Hopfield neural networks are usually used for pattern recognition.
Constructor Summary | |
---|---|
HopfieldNetwork(int size)
|
Method Summary | |
---|---|
IntMatrix |
getMatrix()
Get the weight matrix for this neural network. |
int |
getSize()
Get the size of this neural network. |
boolean[] |
present(boolean[] pattern)
Present a pattern to the neural network and receive the result. |
void |
train(boolean[] pattern)
Train the neural network for the specified pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HopfieldNetwork(int size)
Method Detail |
---|
public IntMatrix getMatrix()
public int getSize()
public boolean[] present(boolean[] pattern)
pattern
- The pattern to be presented to the neural network.
HopfieldException
- The pattern caused a matrix math error.public void train(boolean[] pattern)
pattern
- The pattern to train on.
HopfieldException
- The pattern size must match the size of this neural network.
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |