org.encog.neural.som.training.basic
public class BasicTrainSOM extends BasicTraining implements LearningRate
Constructor and Description |
---|
BasicTrainSOM(SOM network,
double learningRate,
MLDataSet training,
NeighborhoodFunction neighborhood)
Create an instance of competitive training.
|
Modifier and Type | Method and Description |
---|---|
void |
autoDecay()
Should be called each iteration if autodecay is desired.
|
boolean |
canContinue() |
void |
decay(double d)
Called to decay the learning rate and radius by the specified amount.
|
void |
decay(double decayRate,
double decayRadius)
Decay the learning rate and radius by the specified amount.
|
int |
getInputNeuronCount() |
double |
getLearningRate() |
MLMethod |
getMethod()
Get the current best machine learning method from the training.
|
NeighborhoodFunction |
getNeighborhood() |
int |
getOutputNeuronCount() |
boolean |
isForceWinner() |
void |
iteration()
Perform one training iteration.
|
TrainingContinuation |
pause()
Pause the training to continue later.
|
void |
resume(TrainingContinuation state)
Resume training.
|
void |
setAutoDecay(int plannedIterations,
double startRate,
double endRate,
double startRadius,
double endRadius)
Setup autodecay.
|
void |
setForceWinner(boolean forceWinner)
Determine if a winner is to be forced.
|
void |
setLearningRate(double rate)
Set the learning rate.
|
void |
setParams(double rate,
double radius)
Set the learning rate and radius.
|
String |
toString() |
void |
trainPattern(MLData pattern)
Train the specified pattern.
|
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setError, setIteration, setTraining
public BasicTrainSOM(SOM network, double learningRate, MLDataSet training, NeighborhoodFunction neighborhood)
network
- The network to train.learningRate
- The learning rate, how much to apply per iteration.training
- The training set (unsupervised).neighborhood
- The neighborhood function to use.public void autoDecay()
public boolean canContinue()
canContinue
in interface MLTrain
public void decay(double d)
d
- The percent to decay by.public void decay(double decayRate, double decayRadius)
decayRate
- The percent to decay the learning rate by.decayRadius
- The percent to decay the radius by.public int getInputNeuronCount()
public double getLearningRate()
getLearningRate
in interface LearningRate
public MLMethod getMethod()
public NeighborhoodFunction getNeighborhood()
public int getOutputNeuronCount()
public boolean isForceWinner()
public void iteration()
public TrainingContinuation pause()
public void resume(TrainingContinuation state)
public void setAutoDecay(int plannedIterations, double startRate, double endRate, double startRadius, double endRadius)
plannedIterations
- The number of iterations that are planned. This allows the
decay rate to be determined.startRate
- The starting learning rate.endRate
- The ending learning rate.startRadius
- The starting radius.endRadius
- The ending radius.public void setForceWinner(boolean forceWinner)
forceWinner
- True if a winner is to be forced.public void setLearningRate(double rate)
setLearningRate
in interface LearningRate
rate
- The learning rate.public void setParams(double rate, double radius)
rate
- The new learning rate.radius
- The new radius.public void trainPattern(MLData pattern)
pattern
- The pattern to train.Copyright © 2014. All Rights Reserved.