|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.solve.genetic.Chromosome<java.lang.Double>
org.encog.neural.networks.training.genetic.NeuralChromosome
public abstract class NeuralChromosome
NeuralChromosome: Implements a chromosome that allows a feedforward neural network to be trained using a genetic algorithm. The chromosome for a feed forward neural network is the weight and threshold matrix. This class is abstract. If you wish to train the neural network using training sets, you should use the TrainingSetNeuralChromosome 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. The generic type GA_TYPE specifies the GeneticAlgorithm derived class that implements the genetic algorithm that this class is to be used with.
| Constructor Summary | |
|---|---|
NeuralChromosome()
|
|
| Method Summary | |
|---|---|
BasicNetwork |
getNetwork()
|
void |
initGenes(int length)
Init the genes array. |
void |
mutate()
Mutate this chromosome randomly. |
void |
setGenes(java.lang.Double[] list)
Set all genes. |
void |
setNetwork(BasicNetwork network)
|
void |
updateGenes()
Copy the network to the genes. |
void |
updateNetwork()
Copy the genes to the network. |
| Methods inherited from class org.encog.solve.genetic.Chromosome |
|---|
calculateCost, compareTo, getCost, getGene, getGenes, getGeneticAlgorithm, mate, setCost, setGene, setGenesDirect, setGeneticAlgorithm, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NeuralChromosome()
| Method Detail |
|---|
public BasicNetwork getNetwork()
public void initGenes(int length)
length - The length to create.public void mutate()
mutate in class Chromosome<java.lang.Double>public void setGenes(java.lang.Double[] list)
setGenes in class Chromosome<java.lang.Double>list - A list of genes.public void setNetwork(BasicNetwork network)
network - the network to setpublic void updateGenes()
public void updateNetwork()
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||