Class BestScoreEpochTerminationCondition
- java.lang.Object
-
- org.deeplearning4j.earlystopping.termination.BestScoreEpochTerminationCondition
-
- All Implemented Interfaces:
Serializable
,EpochTerminationCondition
public class BestScoreEpochTerminationCondition extends Object implements EpochTerminationCondition
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BestScoreEpochTerminationCondition(double bestExpectedScore)
BestScoreEpochTerminationCondition(double bestExpectedScore, boolean lesserBetter)
Deprecated."lessBetter" argument no longer used
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 otherwiseString
toString()
-
-
-
Constructor Detail
-
BestScoreEpochTerminationCondition
public BestScoreEpochTerminationCondition(double bestExpectedScore)
-
BestScoreEpochTerminationCondition
@Deprecated public BestScoreEpochTerminationCondition(double bestExpectedScore, boolean lesserBetter)
Deprecated."lessBetter" argument no longer used
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:EpochTerminationCondition
Initialize the epoch termination condition (often a no-op)- Specified by:
initialize
in interfaceEpochTerminationCondition
-
terminate
public boolean terminate(int epochNum, double score, boolean minimize)
Description copied from interface:EpochTerminationCondition
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- Specified by:
terminate
in interfaceEpochTerminationCondition
- Parameters:
epochNum
- Number of the last completed epoch (starting at 0)score
- Score calculate for this epoch- Returns:
- Whether training should be terminated at this epoch
-
-