|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.train.BasicTraining
public abstract class BasicTraining
An abstract class that implements basic training for most training algorithms. Specifically training strategies can be added to enhance the training.
Constructor Summary | |
---|---|
BasicTraining()
Used for serialization. |
|
BasicTraining(TrainingImplementationType implementationType)
|
Method Summary | |
---|---|
void |
addStrategy(Strategy strategy)
Training strategies can be added to improve the training results. |
void |
finishTraining()
Should be called after training has completed and the iteration method will not be called any further. |
double |
getError()
|
TrainingImplementationType |
getImplementationType()
|
int |
getIteration()
|
List<Strategy> |
getStrategies()
|
MLDataSet |
getTraining()
|
boolean |
isTrainingDone()
|
void |
iteration(int count)
Perform the specified number of training iterations. |
void |
postIteration()
Call the strategies after an iteration. |
void |
preIteration()
Call the strategies before an iteration. |
void |
setError(double error)
|
void |
setIteration(int iteration)
Set the current training iteration. |
void |
setTraining(MLDataSet training)
Set the training object that this strategy is working with. |
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 |
---|
canContinue, getMethod, iteration, pause, resume |
Constructor Detail |
---|
public BasicTraining()
public BasicTraining(TrainingImplementationType implementationType)
Method Detail |
---|
public void addStrategy(Strategy strategy)
addStrategy
in interface MLTrain
strategy
- The strategy to add.public void finishTraining()
finishTraining
in interface MLTrain
public double getError()
getError
in interface MLTrain
public int getIteration()
getIteration
in interface MLTrain
public List<Strategy> getStrategies()
getStrategies
in interface MLTrain
public MLDataSet getTraining()
getTraining
in interface MLTrain
public boolean isTrainingDone()
isTrainingDone
in interface MLTrain
public void iteration(int count)
iteration
in interface MLTrain
count
- The number of training iterations.public void postIteration()
public void preIteration()
public void setError(double error)
setError
in interface MLTrain
error
- Set the current error rate. This is usually used by training
strategies.public void setIteration(int iteration)
MLTrain
setIteration
in interface MLTrain
iteration
- the iteration to setpublic void setTraining(MLDataSet training)
training
- The training object.public TrainingImplementationType getImplementationType()
getImplementationType
in interface MLTrain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |