@Immutable @Shareable public class ErrorThresholdStoppingCondition extends Object implements StoppingCondition, Serializable
Note: Loop controllers created by this stopping condition support waiting until the threshold has been met for multiple iterations to stop.
This stopping condition differs from ThresholdStoppingCondition
in that it thresholds the absolute error instead of the change in error from
one iteration to another.
Constructor and Description |
---|
ErrorThresholdStoppingCondition(double thresh)
Create a new threshold stop with no minimum iteration count.
|
ErrorThresholdStoppingCondition(double thresh,
int minIter)
Construct a new error threshold stop.
|
Modifier and Type | Method and Description |
---|---|
int |
getMinimumIterations()
Get the minimum iteration count.
|
double |
getThreshold()
Get the stopper's threshold.
|
TrainingLoopController |
newLoop()
Create a controller for a new training loop.
|
String |
toString() |
@Inject public ErrorThresholdStoppingCondition(@StoppingThreshold double thresh, @MinimumIterations int minIter)
thresh
- The threshold.minIter
- The minimum number of iterations.public ErrorThresholdStoppingCondition(double thresh)
thresh
- The threshold value.public TrainingLoopController newLoop()
StoppingCondition
newLoop
in interface StoppingCondition
public double getThreshold()
public int getMinimumIterations()