org.encog.neural.networks.training.anneal
public class NeuralSimulatedAnnealing extends BasicTraining
Modifier and Type | Field and Description |
---|---|
static double |
CUT
The cutoff for random data.
|
Constructor and Description |
---|
NeuralSimulatedAnnealing(MLEncodable network,
CalculateScore calculateScore,
double startTemp,
double stopTemp,
int cycles)
Construct a simulated annleaing trainer for a encodable MLMethod.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canContinue() |
double[] |
getArray()
Get the network as an array of doubles.
|
double[] |
getArrayCopy() |
CalculateScore |
getCalculateScore() |
MLEncodable |
getMethod()
Get the current best machine learning method from the training.
|
void |
iteration()
Perform one iteration of simulated annealing.
|
TrainingContinuation |
pause()
Pause the training to continue later.
|
void |
putArray(double[] array)
Convert an array of doubles to the current best network.
|
void |
randomize()
Randomize the weights and bias values.
|
void |
resume(TrainingContinuation state)
Resume training.
|
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setError, setIteration, setTraining
public static final double CUT
public NeuralSimulatedAnnealing(MLEncodable network, CalculateScore calculateScore, double startTemp, double stopTemp, int cycles)
network
- The neural network to be trained.calculateScore
- Used to calculate the score for a MLMethod.startTemp
- The starting temperature.stopTemp
- The ending temperature.cycles
- The number of cycles in a training iteration.public boolean canContinue()
public double[] getArray()
public double[] getArrayCopy()
public CalculateScore getCalculateScore()
public MLEncodable getMethod()
public void iteration()
public TrainingContinuation pause()
MLTrain
public void putArray(double[] array)
array
- An array.public void randomize()
public void resume(TrainingContinuation state)
state
- The training continuation object to use to continue.Copyright © 2014. All Rights Reserved.