Base class for stopping criteria of optimization algorithms. More...
#include <shark/Algorithms/StoppingCriteria/AbstractStoppingCriterion.h>
Public Types | |
typedef ResultSetT | ResultSet |
Public Member Functions | |
virtual void | reset ()=0 |
resets the internal state. call before a new trial More... | |
virtual bool | stop (ResultSet const &set)=0 |
Base class for stopping criteria of optimization algorithms.
Each stopping criterion provides a stop method which takes as argument the latest result of an optimization algorithm. This result is passed as a ResultSetT, which is a template type of this interface. In actual implementations, that type will usually hold the latest objective function value reached by the optimizer on the training set, but may also additionally encapsulate a performance value reached on a validation set. The stopping criteria may then use this information to reach their characteristic decision of whether or not stopping the optimization process is indicated or not.
Definition at line 51 of file AbstractStoppingCriterion.h.
typedef ResultSetT shark::AbstractStoppingCriterion< ResultSetT >::ResultSet |
Definition at line 53 of file AbstractStoppingCriterion.h.
|
pure virtual |
resets the internal state. call before a new trial
Implemented in shark::GeneralizationQuotient< PointType >, shark::TrainingProgress< PointType >, shark::GeneralizationLoss< PointType >, shark::TrainingError< PointType >, shark::ValidatedStoppingCriterion, and shark::MaxIterations< ResultSet >.
Referenced by shark::ValidatedStoppingCriterion::reset(), and shark::OptimizationTrainer< Model, LabelTypeT >::train().
|
pure virtual |
after an iteration, updates the internal state and checks whether the algorithm should stop
set | the result of the current iteration |
Implemented in shark::GeneralizationQuotient< PointType >, shark::GeneralizationLoss< PointType >, shark::TrainingProgress< PointType >, shark::TrainingError< PointType >, shark::ValidatedStoppingCriterion, and shark::MaxIterations< ResultSet >.
Referenced by shark::ValidatedStoppingCriterion::stop(), and shark::OptimizationTrainer< Model, LabelTypeT >::train().