public class SimulatedAnnealingLearning extends SupervisedLearning
Modifier and Type | Field and Description |
---|---|
protected double |
temperature
The current temperature.
|
maxError, previousEpochError
currentIteration, learningRate, stopConditions
listeners, neuralNetwork, trainingSet
Constructor and Description |
---|
SimulatedAnnealingLearning(NeuralNetwork network) |
SimulatedAnnealingLearning(NeuralNetwork network,
double startTemp,
double stopTemp,
int cycles)
Construct a simulated annleaing trainer for a feedforward neural network.
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateWeightChanges(double[] patternError)
Not used.
|
void |
doLearningEpoch(DataSet trainingSet)
Perform one simulated annealing epoch.
|
void |
doLearningEpoch(DataSet trainingSet,
double randomChance) |
NeuralNetwork |
getNetwork()
Get the best network from the training.
|
void |
randomize(double randomChance)
Randomize the weights and thresholds.
|
afterEpoch, beforeEpoch, doBatchWeightsUpdate, getErrorFunction, getMaxError, getMinErrorChange, getMinErrorChangeIterationsCount, getMinErrorChangeIterationsLimit, getPreviousEpochError, getTotalNetworkError, isBatchMode, learn, learn, learnPattern, onStart, setBatchMode, setErrorFunction, setMaxError, setMinErrorChange, setMinErrorChangeIterationsLimit
doOneLearningIteration, getCurrentIteration, getLearningRate, getMaxIterations, hasReachedStopCondition, isIterationsLimited, isPausedLearning, learn, learn, pause, resume, setLearningRate, setMaxIterations
addListener, fireLearningEvent, getNeuralNetwork, getTrainingSet, isStopped, onStop, removeListener, setNeuralNetwork, setTrainingSet, stopLearning
public SimulatedAnnealingLearning(NeuralNetwork 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.public SimulatedAnnealingLearning(NeuralNetwork network)
public NeuralNetwork getNetwork()
public void randomize(double randomChance)
randomChance
- public void doLearningEpoch(DataSet trainingSet)
doLearningEpoch
in class SupervisedLearning
trainingSet
- training set for training networkpublic void doLearningEpoch(DataSet trainingSet, double randomChance)
protected void calculateWeightChanges(double[] patternError)
calculateWeightChanges
in class SupervisedLearning
patternError
- output error vector for some network input (aka. patternError, network error)
usually the difference between desired and actual outputCopyright © 2019 Neuroph Project. All rights reserved.