The Encog Project

org.encog.neural.networks.training.genetic
Class NeuralGeneticAlgorithm

java.lang.Object
  extended by org.encog.neural.networks.training.BasicTraining
      extended by org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm
All Implemented Interfaces:
Train
Direct Known Subclasses:
TrainingSetNeuralGeneticAlgorithm

public class NeuralGeneticAlgorithm
extends BasicTraining

Implements a genetic algorithm that allows a feedforward neural network to be trained using a genetic algorithm. This algorithm is for a feed forward neural network. This class is somewhat undefined. If you wish to train the neural network using training sets, you should use the TrainingSetNeuralGeneticAlgorithm class. If you wish to use a cost function to train the neural network, then implement a subclass of this one that properly calculates the cost.


Constructor Summary
NeuralGeneticAlgorithm()
          Construct the training class.
 
Method Summary
 org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm.NeuralGeneticAlgorithmHelper getGenetic()
           
 BasicNetwork getNetwork()
          Get the current best network from the training.
 void iteration()
          Perform one training iteration.
 void setGenetic(org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm.NeuralGeneticAlgorithmHelper genetic)
          Set the genetic helper class.
 
Methods inherited from class org.encog.neural.networks.training.BasicTraining
addStrategy, getError, getStrategies, getTraining, postIteration, preIteration, setError, setTraining
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeuralGeneticAlgorithm

public NeuralGeneticAlgorithm()
Construct the training class.

Method Detail

getGenetic

public org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm.NeuralGeneticAlgorithmHelper getGenetic()
Returns:
The genetic algorithm implementation.

getNetwork

public BasicNetwork getNetwork()
Description copied from interface: Train
Get the current best network from the training.

Returns:
The network that is being trained.

iteration

public void iteration()
Perform one training iteration.


setGenetic

public void setGenetic(org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm.NeuralGeneticAlgorithmHelper genetic)
Set the genetic helper class.

Parameters:
genetic - The genetic helper class.

The Encog Project