The Encog Project

org.encog.neural.networks.training
Interface Train

All Known Implementing Classes:
Backpropagation, BasicTraining, CompetitiveTraining, ManhattanPropagation, MultiPropagation, NeuralGeneticAlgorithm, NeuralSimulatedAnnealing, NeuralTrainingSetSimulatedAnnealing, Propagation, ResilientPropagation, TrainAdaline, TrainingSetNeuralGeneticAlgorithm, 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.
 double getError()
          Get the current error percent from the training.
 BasicNetwork getNetwork()
          Get the current best network from the training.
 java.util.List<Strategy> getStrategies()
           
 NeuralDataSet getTraining()
           
 void iteration()
          Perform one iteration of training.
 void setError(double error)
           
 

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

java.util.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.


setError

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

The Encog Project