|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.genetic.GeneticAlgorithm
org.encog.neural.neat.training.NEATTraining
public class NEATTraining
Implements NEAT genetic training. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks. It was developed by Ken Stanley while at The University of Texas at Austin. http://www.cs.ucf.edu/~kstanley/
| Constructor Summary | |
|---|---|
NEATTraining(CalculateScore calculateScore,
int inputCount,
int outputCount,
int populationSize)
Construct a neat trainer with a new population. |
|
NEATTraining(CalculateScore calculateScore,
Population population)
Construct neat training with an existing population. |
|
| Method Summary | |
|---|---|
void |
addNeuronID(long nodeID,
List<Long> vec)
Add a neuron. |
void |
addStrategy(Strategy strategy)
Not supported, will throw an error. |
void |
adjustCompatibilityThreshold()
Adjust the species compatibility threshold. |
void |
adjustSpeciesScore()
Adjust each species score. |
boolean |
canContinue()
|
NEATGenome |
crossover(NEATGenome mom,
NEATGenome dad)
Perform the crossover. |
void |
finishTraining()
Called when training is done. |
double |
getError()
return The error for the best genome. |
TrainingImplementationType |
getImplementationType()
|
NEATInnovationList |
getInnovations()
|
int |
getInputCount()
|
int |
getIteration()
|
MLMethod |
getMethod()
Get the current best machine learning method from the training. |
int |
getOutputCount()
|
List<Strategy> |
getStrategies()
Returns an empty list, strategies are not supported. |
MLDataSet |
getTraining()
Returns null, does not use a training set, rather uses a score function. |
boolean |
isSnapshot()
|
boolean |
isTrainingDone()
|
void |
iteration()
Perform one training iteration. |
void |
iteration(int count)
Perform the specified number of training iterations. |
TrainingContinuation |
pause()
Pause the training to continue later. |
void |
resetAndKill()
Reset for an iteration. |
void |
resume(TrainingContinuation state)
Resume training. |
void |
setError(double error)
Not used. |
void |
setIteration(int iteration)
Set the current training iteration. |
void |
setSnapshot(boolean snapshot)
Set if we are using snapshot mode. |
void |
sortAndRecord()
Sort the genomes. |
void |
speciateAndCalculateSpawnLevels()
Determine the species. |
NEATGenome |
tournamentSelection(int numComparisons)
Select a gene using a tournament. |
| Methods inherited from class org.encog.ml.genetic.GeneticAlgorithm |
|---|
addSpeciesMember, calculateScore, getCalculateScore, getComparator, getCrossover, getMatingPopulation, getMutate, getMutationPercent, getPercentToMate, getPopulation, getThreadCount, setCalculateScore, setComparator, setCrossover, setMatingPopulation, setMutate, setMutationPercent, setPercentToMate, setPopulation, setThreadCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NEATTraining(CalculateScore calculateScore,
int inputCount,
int outputCount,
int populationSize)
calculateScore - The score calculation object.inputCount - The input neuron count.outputCount - The output neuron count.populationSize - The population size.
public NEATTraining(CalculateScore calculateScore,
Population population)
calculateScore - The score object to use.population - The population to use.| Method Detail |
|---|
public void addNeuronID(long nodeID,
List<Long> vec)
nodeID - The neuron id.vec - THe list of id's used.public void addStrategy(Strategy strategy)
addStrategy in interface MLTrainstrategy - Not used.public void adjustCompatibilityThreshold()
public void adjustSpeciesScore()
public boolean canContinue()
canContinue in interface MLTrain
public NEATGenome crossover(NEATGenome mom,
NEATGenome dad)
mom - The mother.dad - The father.
public void finishTraining()
finishTraining in interface MLTrainpublic double getError()
getError in interface MLTrainpublic TrainingImplementationType getImplementationType()
getImplementationType in interface MLTrainpublic NEATInnovationList getInnovations()
public int getInputCount()
public int getIteration()
getIteration in interface MLTrainpublic MLMethod getMethod()
MLTrain
getMethod in interface MLTrainpublic int getOutputCount()
public List<Strategy> getStrategies()
getStrategies in interface MLTrainpublic MLDataSet getTraining()
getTraining in interface MLTrainpublic boolean isSnapshot()
public boolean isTrainingDone()
isTrainingDone in interface MLTrainpublic void iteration()
iteration in interface MLTrainiteration in class GeneticAlgorithmpublic void iteration(int count)
iteration in interface MLTraincount - The number of training iterations.public TrainingContinuation pause()
MLTrain
pause in interface MLTrainpublic void resetAndKill()
public void resume(TrainingContinuation state)
MLTrain
resume in interface MLTrainstate - The training continuation object to use to continue.public void setError(double error)
setError in interface MLTrainerror - Not used.public void setIteration(int iteration)
MLTrain
setIteration in interface MLTrainiteration - Iteration.public void setSnapshot(boolean snapshot)
snapshot - True if we are using snapshot mode.public void sortAndRecord()
public void speciateAndCalculateSpawnLevels()
public NEATGenome tournamentSelection(int numComparisons)
numComparisons - The number of compares to do.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||