|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.neural.networks.training.BasicTraining
org.encog.neural.networks.training.anneal.NeuralSimulatedAnnealing
public abstract class NeuralSimulatedAnnealing
This class implements a simulated annealing training algorithm for neural networks. It is based on the generic SimulatedAnnealing class. It is used in the same manner as any other training class that implements the Train interface. This class is abstract, to create your own version of simulated annealing, you must provide an implementation of the determineError method. If you want to train with a training set, use the NeuralTrainingSetSimulatedAnnealing class.
| Field Summary | |
|---|---|
static double |
CUT
The cutoff for random data. |
| Constructor Summary | |
|---|---|
NeuralSimulatedAnnealing(BasicNetwork network,
double startTemp,
double stopTemp,
int cycles)
Construct a simulated annleaing trainer for a feedforward neural network. |
|
| Method Summary | |
|---|---|
abstract double |
determineError()
Determine the error of the current weights and thresholds. |
java.lang.Double[] |
getArray()
Get the network as an array of doubles. |
java.lang.Double[] |
getArrayCopy()
|
BasicNetwork |
getNetwork()
Get the best network from the training. |
void |
iteration()
Perform one iteration of simulated annealing. |
void |
putArray(java.lang.Double[] array)
Convert an array of doubles to the current best network. |
void |
randomize()
Randomize the weights and thresholds. |
| Methods inherited from class org.encog.neural.networks.training.BasicTraining |
|---|
addStrategy, finishTraining, getError, getStrategies, getTraining, postIteration, preIteration, setError, setTraining |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double CUT
| Constructor Detail |
|---|
public NeuralSimulatedAnnealing(BasicNetwork network,
double startTemp,
double stopTemp,
int cycles)
network - The neural network to be trained.startTemp - The starting temperature.stopTemp - The ending temperature.cycles - The number of cycles in a training iteration.| Method Detail |
|---|
public BasicNetwork getNetwork()
public void iteration()
public abstract double determineError()
public java.lang.Double[] getArray()
public java.lang.Double[] getArrayCopy()
public void putArray(java.lang.Double[] array)
array - An array.public void randomize()
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||