org.encog.neural.freeform.training
public abstract class FreeformPropagationTraining extends BasicTraining implements Serializable
Modifier and Type | Field and Description |
---|---|
static double |
FLAT_SPOT_CONST
The constant to use to fix the flat spot problem.
|
Constructor and Description |
---|
FreeformPropagationTraining()
Don't use this constructor, it is for serialization only.
|
FreeformPropagationTraining(FreeformNetwork theNetwork,
MLDataSet theTraining)
Construct the trainer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canContinue() |
void |
finishTraining()
Should be called after training has completed and the iteration method
will not be called any further.
|
int |
getBatchSize() |
double |
getError() |
TrainingImplementationType |
getImplementationType() |
int |
getIteration() |
MLMethod |
getMethod()
Get the current best machine learning method from the training.
|
MLDataSet |
getTraining() |
boolean |
isFixFlatSopt() |
void |
iteration()
Perform one iteration of training.
|
void |
iteration(int count)
Perform the specified number of training iterations.
|
protected void |
learn()
Learn for the entire network.
|
protected abstract void |
learnConnection(FreeformConnection connection)
Learn for a single connection.
|
protected void |
processBatches()
Process training batches.
|
protected void |
processPureBatch()
Process training for pure batch mode (one single batch).
|
void |
setBatchSize(int batchSize)
Set the batch size.
|
void |
setError(double theError) |
void |
setFixFlatSopt(boolean fixFlatSopt)
Set if we should fix the flat spot problem.
|
void |
setIteration(int iteration)
Set the current training iteration.
|
addStrategy, getStrategies, isTrainingDone, postIteration, preIteration, setTraining
public static final double FLAT_SPOT_CONST
public FreeformPropagationTraining()
public FreeformPropagationTraining(FreeformNetwork theNetwork, MLDataSet theTraining)
theNetwork
- The network to train.theTraining
- The training data.public boolean canContinue()
canContinue
in interface MLTrain
public void finishTraining()
finishTraining
in interface MLTrain
finishTraining
in class BasicTraining
public double getError()
getError
in interface MLTrain
getError
in class BasicTraining
public TrainingImplementationType getImplementationType()
getImplementationType
in interface MLTrain
getImplementationType
in class BasicTraining
public int getIteration()
getIteration
in interface MLTrain
getIteration
in class BasicTraining
public MLMethod getMethod()
public MLDataSet getTraining()
getTraining
in interface MLTrain
getTraining
in class BasicTraining
public boolean isFixFlatSopt()
public void iteration()
public void iteration(int count)
iteration
in interface MLTrain
iteration
in class BasicTraining
count
- The number of training iterations.protected void processPureBatch()
protected void processBatches()
protected void learn()
protected abstract void learnConnection(FreeformConnection connection)
connection
- The connection to learn from.public void setError(double theError)
setError
in interface MLTrain
setError
in class BasicTraining
theError
- Set the current error rate. This is usually used by training
strategies.public void setFixFlatSopt(boolean fixFlatSopt)
fixFlatSopt
- True, if we should fix the flat spot problem.public void setIteration(int iteration)
setIteration
in interface MLTrain
setIteration
in class BasicTraining
iteration
- the iteration to setpublic int getBatchSize()
public void setBatchSize(int batchSize)
batchSize
- The batch size.Copyright © 2014. All Rights Reserved.