|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.ea.train.basic.BasicEA
org.encog.ml.ea.train.basic.TrainEA
public class TrainEA
Provides a MLTrain compatible class that can be used to train genomes.
Constructor Summary | |
---|---|
TrainEA(Population thePopulation,
CalculateScore theScoreFunction)
Create a trainer for a score function. |
|
TrainEA(Population thePopulation,
MLDataSet trainingData)
Create a trainer for training data. |
Method Summary | |
---|---|
void |
addStrategy(Strategy strategy)
Not supported, will throw an error. |
boolean |
canContinue()
|
void |
finishTraining()
Called when training is finished. |
TrainingImplementationType |
getImplementationType()
|
MLMethod |
getMethod()
Get the current best machine learning method from the training. |
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 |
isTrainingDone()
|
void |
iteration(int count)
Perform the specified number of training iterations. |
TrainingContinuation |
pause()
Pause the training to continue later. |
void |
resume(TrainingContinuation state)
Resume training. |
void |
setError(double error)
Not used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.encog.ml.train.MLTrain |
---|
getError, getIteration, iteration, setIteration |
Constructor Detail |
---|
public TrainEA(Population thePopulation, CalculateScore theScoreFunction)
thePopulation
- The population.theScoreFunction
- The score function.public TrainEA(Population thePopulation, MLDataSet trainingData)
thePopulation
- The population.trainingData
- The training data.Method Detail |
---|
public void setError(double error)
setError
in interface MLTrain
error
- Not used.public boolean isTrainingDone()
isTrainingDone
in interface MLTrain
public TrainingImplementationType getImplementationType()
getImplementationType
in interface MLTrain
public void iteration(int count)
iteration
in interface MLTrain
count
- The number of training iterations.public TrainingContinuation pause()
pause
in interface MLTrain
public void resume(TrainingContinuation state)
resume
in interface MLTrain
state
- The training continuation object to use to continue.public void addStrategy(Strategy strategy)
addStrategy
in interface MLTrain
strategy
- Not used.public boolean canContinue()
canContinue
in interface MLTrain
public void finishTraining()
finishTraining
in interface EvolutionaryAlgorithm
finishTraining
in interface MLTrain
finishTraining
in class BasicEA
public MLMethod getMethod()
MLTrain
getMethod
in interface MLTrain
public MLDataSet getTraining()
getTraining
in interface MLTrain
public List<Strategy> getStrategies()
getStrategies
in interface MLTrain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |