public class ScoreImprovementEpochTerminationCondition extends Object implements EpochTerminationCondition
Constructor and Description |
---|
ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement) |
ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement,
double minImprovement) |
Modifier and Type | Method and Description |
---|---|
void |
initialize()
Initialize the epoch termination condition (often a no-op)
|
boolean |
terminate(int epochNum,
double score,
boolean minimize)
Should the early stopping training terminate at this epoch, based on the calculated score and the epoch number?
Returns true if training should terminated, or false otherwise
|
String |
toString() |
public ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement)
public ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement, double minImprovement)
public void initialize()
EpochTerminationCondition
initialize
in interface EpochTerminationCondition
public boolean terminate(int epochNum, double score, boolean minimize)
EpochTerminationCondition
terminate
in interface EpochTerminationCondition
epochNum
- Number of the last completed epoch (starting at 0)score
- Score calculate for this epochCopyright © 2019. All rights reserved.