The Encog Project

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

java.lang.Object
  extended by org.encog.solve.genetic.GeneticAlgorithm<java.lang.Double>
      extended by org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm
All Implemented Interfaces:
Train
Direct Known Subclasses:
TrainingSetNeuralGeneticAlgorithm

public class NeuralGeneticAlgorithm
extends GeneticAlgorithm<java.lang.Double>
implements Train

NeuralGeneticAlgorithm: 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 abstract. 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.


Field Summary
 
Fields inherited from class org.encog.solve.genetic.GeneticAlgorithm
TIMEOUT
 
Constructor Summary
NeuralGeneticAlgorithm()
           
 
Method Summary
 double getError()
          Get the current error percent from the training.
 BasicNetwork getNetwork()
          Get the current best neural network.
 
Methods inherited from class org.encog.solve.genetic.GeneticAlgorithm
getChromosome, getChromosomes, getCutLength, getMatingPopulation, getMutationPercent, getPercentToMate, getPool, getPopulationSize, isPreventRepeat, iteration, setChromosome, setChromosomes, setCutLength, setMatingPopulation, setMutationPercent, setPercentToMate, setPool, setPopulationSize, setPreventRepeat, sortChromosomes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.encog.neural.networks.Train
iteration
 

Constructor Detail

NeuralGeneticAlgorithm

public NeuralGeneticAlgorithm()
Method Detail

getNetwork

public BasicNetwork getNetwork()
Get the current best neural network.

Specified by:
getNetwork in interface Train
Returns:
The current best neural network.

getError

public double getError()
Description copied from interface: Train
Get the current error percent from the training.

Specified by:
getError in interface Train
Returns:
The error from the last iteration.

The Encog Project