org.encog.neural.networks.training
Interface Train

All Known Implementing Classes:
Backpropagation, BasicTraining, CompetitiveTraining, CrossTraining, CrossValidationKFold, HebbianTraining, LevenbergMarquardtTraining, ManhattanPropagation, NEATTraining, NeuralGeneticAlgorithm, NeuralSimulatedAnnealing, Propagation, ResilientPropagation, ScaledConjugateGradient, SVDTraining, SVMTrain, TrainAdaline, TrainInstar, TrainOutstar

public interface Train

Interface for all neural network training methods. This allows the training methods to be largely interchangeable. Though some training methods require specific types of neural network structure.


Method Summary
 void addStrategy(Strategy strategy)
          Training strategies can be added to improve the training results.
 void finishTraining()
          Should be called once training is complete and no more iterations are needed.
 EncogCloud getCloud()
           
 double getError()
          Get the current error percent from the training.
 int getIteration()
           
 BasicNetwork getNetwork()
          Get the current best network from the training.
 List<Strategy> getStrategies()
           
 NeuralDataSet getTraining()
           
 boolean isTrainingDone()
           
 void iteration()
          Perform one iteration of training.
 void iteration(int count)
          Perform a number of training iterations.
 void setCloud(EncogCloud cloud)
          Set the cloud use to track the training.
 void setError(double error)
           
 void setIteration(int iteration)
          Set the current training iteration.
 

Method Detail

addStrategy

void addStrategy(Strategy strategy)
Training strategies can be added to improve the training results. There are a number to choose from, and several can be used at once.

Parameters:
strategy - The strategy to add.

finishTraining

void finishTraining()
Should be called once training is complete and no more iterations are needed. Calling iteration again will simply begin the training again, and require finishTraining to be called once the new training session is complete. It is particularly important to call finishTraining for multithreaded training techniques.


getError

double getError()
Get the current error percent from the training.

Returns:
The current error.

getNetwork

BasicNetwork getNetwork()
Get the current best network from the training.

Returns:
The best network.

getStrategies

List<Strategy> getStrategies()
Returns:
The strategies to use.

getTraining

NeuralDataSet getTraining()
Returns:
The training data to use.

iteration

void iteration()
Perform one iteration of training.


iteration

void iteration(int count)
Perform a number of training iterations.

Parameters:
count - The number of iterations to perform.

setError

void setError(double error)
Parameters:
error - Set the current error rate. This is usually used by training strategies.

setCloud

void setCloud(EncogCloud cloud)
Set the cloud use to track the training.

Parameters:
cloud - The cloud used to track the training.

getCloud

EncogCloud getCloud()
Returns:
The cloud used to track the training.

isTrainingDone

boolean isTrainingDone()
Returns:
True if training can progress no further.

getIteration

int getIteration()
Returns:
The current training iteration.

setIteration

void setIteration(int iteration)
Set the current training iteration.

Parameters:
iteration - Iteration.


Copyright © 2011. All Rights Reserved.