@Immutable @Shareable public class ThresholdStoppingCondition extends Object implements StoppingCondition, Serializable
Stop when absolute delta drops below a threshold.
Constructor and Description |
---|
ThresholdStoppingCondition(double thresh)
Create a new threshold stop with no minimum iteration count.
|
ThresholdStoppingCondition(double thresh,
int minIter)
Construct a new 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 ThresholdStoppingCondition(@StoppingThreshold double thresh, @MinimumIterations int minIter)
Construct a new threshold stop.
thresh
- The threshold.minIter
- The minimum number of iterations.public ThresholdStoppingCondition(double thresh)
Create a new threshold stop with no minimum iteration count.
thresh
- The threshold value.public TrainingLoopController newLoop()
StoppingCondition
Create a controller for a new training loop.
newLoop
in interface StoppingCondition
public double getThreshold()
Get the stopper’s threshold.
public int getMinimumIterations()
Get the minimum iteration count.