org.encog.neural.networks.training.propagation
Class Propagation

java.lang.Object
  extended by org.encog.ml.train.BasicTraining
      extended by org.encog.neural.networks.training.propagation.Propagation
All Implemented Interfaces:
MLTrain, Train
Direct Known Subclasses:
Backpropagation, ManhattanPropagation, ResilientPropagation, ScaledConjugateGradient

public abstract class Propagation
extends BasicTraining
implements Train

Implements basic functionality that is needed by each of the propagation methods. The specifics of each of the propagation methods is implemented inside of the PropagationMethod interface implementors.

Author:
jheaton

Constructor Summary
Propagation(ContainsFlat network, MLDataSet training)
          Construct a propagation object.
 
Method Summary
 void finishTraining()
          Should be called after training has completed and the iteration method will not be called any further.
 FlatNetwork getCurrentFlatNetwork()
           
 TrainFlatNetwork getFlatTraining()
           
 MLMethod getMethod()
          Get the current best machine learning method from the training.
 int getNumThreads()
           
 void iteration()
          Perform one training iteration.
 void iteration(int count)
          Perform the specified number of training iterations.
 void setFlatTraining(TrainFlatNetwork flatTraining)
           
 void setNumThreads(int numThreads)
          Set the number of threads.
 
Methods inherited from class org.encog.ml.train.BasicTraining
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, postIteration, preIteration, setError, setIteration, setTraining
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.encog.ml.train.MLTrain
addStrategy, canContinue, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, pause, resume, setError, setIteration
 

Constructor Detail

Propagation

public Propagation(ContainsFlat network,
                   MLDataSet training)
Construct a propagation object.

Parameters:
network - The network.
training - The training set.
Method Detail

finishTraining

public final void finishTraining()
Should be called after training has completed and the iteration method will not be called any further.

Specified by:
finishTraining in interface MLTrain
Overrides:
finishTraining in class BasicTraining

getCurrentFlatNetwork

public final FlatNetwork getCurrentFlatNetwork()
Returns:
the currentFlatNetwork

getFlatTraining

public final TrainFlatNetwork getFlatTraining()
Returns:
the flatTraining

getMethod

public final MLMethod getMethod()
Get the current best machine learning method from the training.

Specified by:
getMethod in interface MLTrain
Returns:
The best machine learningm method.

getNumThreads

public final int getNumThreads()
Returns:
The number of threads.

iteration

public final void iteration()
Perform one training iteration.

Specified by:
iteration in interface MLTrain

iteration

public final void iteration(int count)
Perform the specified number of training iterations. This can be more efficient than single training iterations. This is particularly true if you are training with a GPU.

Specified by:
iteration in interface MLTrain
Overrides:
iteration in class BasicTraining
Parameters:
count - The number of training iterations.

setFlatTraining

public final void setFlatTraining(TrainFlatNetwork flatTraining)
Parameters:
flatTraining - the flatTraining to set

setNumThreads

public final void setNumThreads(int numThreads)
Set the number of threads. Specify zero to tell Encog to automatically determine the best number of threads for the processor. If OpenCL is used as the target device, then this value is not used.

Parameters:
numThreads - The number of threads.


Copyright © 2011. All Rights Reserved.