The Encog Project

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

java.lang.Object
  extended by org.encog.solve.genetic.GeneticAlgorithm<java.lang.Double>
      extended by org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm
          extended by org.encog.neural.networks.training.genetic.TrainingSetNeuralGeneticAlgorithm

public class TrainingSetNeuralGeneticAlgorithm
extends NeuralGeneticAlgorithm

TrainingSetNeuralGeneticAlgorithm: 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. The neural network is trained using training sets.


Field Summary
 
Fields inherited from class org.encog.solve.genetic.GeneticAlgorithm
TIMEOUT
 
Constructor Summary
TrainingSetNeuralGeneticAlgorithm(BasicNetwork network, boolean reset, NeuralDataSet training, int populationSize, double mutationPercent, double percentToMate)
          Construct a training object.
 
Method Summary
 double getError()
          Returns the root mean square error for a complet training set.
 NeuralDataSet getTraining()
           
 
Methods inherited from class org.encog.neural.networks.training.genetic.NeuralGeneticAlgorithm
getNetwork
 
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
 

Constructor Detail

TrainingSetNeuralGeneticAlgorithm

public TrainingSetNeuralGeneticAlgorithm(BasicNetwork network,
                                         boolean reset,
                                         NeuralDataSet training,
                                         int populationSize,
                                         double mutationPercent,
                                         double percentToMate)
Construct a training object.

Parameters:
network - The network to train.
reset - Should each chromosome be reset.
training - The training set.
populationSize - The population size.
mutationPercent - The mutation percent.
percentToMate - The percent to mate.
Method Detail

getError

public double getError()
Returns the root mean square error for a complet training set.

Returns:
The current error for the neural network.
Throws:
NeuralNetworkException

getTraining

public NeuralDataSet getTraining()
Returns:
the training data

The Encog Project