|
||||||||||
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.thermal.ThermalNetwork
org.encog.neural.thermal.HopfieldNetwork
public class HopfieldNetwork
Implements a Hopfield network.
Constructor Summary | |
---|---|
HopfieldNetwork()
Default constructor. |
|
HopfieldNetwork(int neuronCount)
Construct a Hopfield with the specified neuron count. |
Method Summary | |
---|---|
void |
addPattern(MLData pattern)
Train the neural network for the specified pattern. |
MLData |
compute(MLData input)
Note: for Hopfield networks, you will usually want to call the "run" method to compute the output. |
int |
getInputCount()
|
int |
getOutputCount()
|
void |
run()
Perform one Hopfield iteration. |
int |
runUntilStable(int max)
Run the network until it becomes stable and does not change from more runs. |
void |
updateProperties()
Update any objeccts when a property changes. |
Methods inherited from class org.encog.neural.thermal.ThermalNetwork |
---|
addWeight, calculateEnergy, clear, getCurrentState, getNeuronCount, getWeight, getWeights, init, reset, reset, setCurrentState, setCurrentState, setNeuronCount, setWeight, setWeights |
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 HopfieldNetwork()
public HopfieldNetwork(int neuronCount)
neuronCount
- The neuron count.Method Detail |
---|
public void addPattern(MLData pattern)
pattern
- The pattern to train for.public MLData compute(MLData input)
input
- The input pattern.
public int getInputCount()
public int getOutputCount()
public void run()
public int runUntilStable(int max)
max
- The maximum number of cycles to run before giving up.
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 |