org.encog.ml.train.strategy
public class StopTrainingStrategy extends Object implements EndTrainingStrategy
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_MIN_IMPROVEMENT
The default minimum improvement before training stops.
|
static int |
DEFAULT_TOLERATE_CYCLES
The default number of cycles to tolerate.
|
Constructor and Description |
---|
StopTrainingStrategy()
Construct the strategy with default options.
|
StopTrainingStrategy(double minImprovement,
int toleratedCycles)
Construct the strategy with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
init(MLTrain train)
Initialize this strategy.
|
void |
postIteration()
Called just after a training iteration.
|
void |
preIteration()
Called just before a training iteration.
|
boolean |
shouldStop() |
public static final double DEFAULT_MIN_IMPROVEMENT
public static final int DEFAULT_TOLERATE_CYCLES
public StopTrainingStrategy()
public StopTrainingStrategy(double minImprovement, int toleratedCycles)
minImprovement
- The minimum accepted improvement.toleratedCycles
- The number of cycles to tolerate before stopping.public void init(MLTrain train)
public void postIteration()
postIteration
in interface Strategy
public void preIteration()
preIteration
in interface Strategy
public boolean shouldStop()
shouldStop
in interface EndTrainingStrategy
Copyright © 2014. All Rights Reserved.