org.encog.neural.thermal
public class HopfieldNetwork extends ThermalNetwork
Constructor and Description |
---|
HopfieldNetwork()
Default constructor.
|
HopfieldNetwork(int neuronCount)
Construct a Hopfield with the specified neuron count.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addWeight, calculateEnergy, clear, getCurrentState, getNeuronCount, getWeight, getWeights, init, reset, reset, setCurrentState, setCurrentState, setNeuronCount, setWeight, setWeights
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty
public HopfieldNetwork()
public HopfieldNetwork(int neuronCount)
neuronCount
- The neuron count.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
Copyright © 2014. All Rights Reserved.