org.encog.ml.ea.train.basic
public class TrainEA extends BasicEA implements MLTrain
| Constructor and Description |
|---|
TrainEA(Population thePopulation,
CalculateScore theScoreFunction)
Create a trainer for a score function.
|
TrainEA(Population thePopulation,
MLDataSet trainingData)
Create a trainer for training data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStrategy(Strategy strategy)
Training strategies can be added to improve the training results.
|
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() |
MLDataSet |
getTraining()
Returns null, does not use a training set, rather uses a score function.
|
boolean |
isTrainingDone() |
void |
iteration()
Perform a training iteration.
|
void |
iteration(int count)
Perform the specified number of training iterations.
|
TrainingContinuation |
pause()
Pause the training to continue later.
|
void |
postIteration()
Call the strategies after an iteration.
|
void |
preIteration()
Call the strategies before an iteration.
|
void |
resume(TrainingContinuation state)
Resume training.
|
void |
setError(double error)
Not used.
|
addChild, addOperation, addScoreAdjuster, calculateScore, calculateScoreAdjustment, getBestComparator, getBestGenome, getChampMutation, getCODEC, getEliteRate, getError, getIteration, getMaxIndividualSize, getMaxOperationErrors, getMaxTries, getOldBestGenome, getOperators, getPopulation, getRandomNumberFactory, getRules, getScoreAdjusters, getScoreFunction, getSelection, getSelectionComparator, getShouldIgnoreExceptions, getSpeciation, getThreadCount, isValidationMode, performShutdownTask, reportError, setBestComparator, setChampMutation, setCODEC, setEliteRate, setIteration, setMaxOperationErrors, setMaxTries, setPopulation, setRandomNumberFactory, setRules, setSelection, setSelectionComparator, setShouldIgnoreExceptions, setSpeciation, setThreadCount, setValidationModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetError, getIteration, setIterationpublic 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.public void setError(double error)
public boolean isTrainingDone()
isTrainingDone in interface MLTrainpublic TrainingImplementationType getImplementationType()
getImplementationType in interface MLTrainpublic void iteration(int count)
public TrainingContinuation pause()
public void resume(TrainingContinuation state)
public void addStrategy(Strategy strategy)
addStrategy in interface MLTrainstrategy - The strategy to add.public boolean canContinue()
canContinue in interface MLTrainpublic void finishTraining()
finishTraining in interface EvolutionaryAlgorithmfinishTraining in interface MLTrainfinishTraining in class BasicEApublic MLMethod getMethod()
MLTrainpublic MLDataSet getTraining()
getTraining in interface MLTrainpublic List<Strategy> getStrategies()
getStrategies in interface MLTrainpublic void iteration()
BasicEApublic void postIteration()
public void preIteration()
Copyright © 2014. All Rights Reserved.