This stopping criterion tracks the improvement of the training error over an interval of iterations. More...
#include <shark/Algorithms/StoppingCriteria/TrainingProgress.h>
Public Types | |
typedef SingleObjectiveResultSet< PointType > | ResultSet |
Public Types inherited from shark::AbstractStoppingCriterion< ResultSetT > | |
typedef ResultSetT | ResultSet |
Public Member Functions | |
TrainingProgress (size_t intervalSize, double minImprovement) | |
bool | stop (const ResultSet &set) |
returns true if training should stop | |
void | reset () |
resets the internal state | |
double | value () const |
returns current value of progress | |
Public Member Functions inherited from shark::AbstractStoppingCriterion< ResultSetT > | |
virtual bool | stop (ResultSet const &set)=0 |
Protected Attributes | |
double | m_minTraining |
minimum training error encountered | |
double | m_minImprovement |
minimum improvement allowed before training stops | |
double | m_meanPerformance |
mean performance over the last intervalSize timesteps | |
double | m_progress |
current progress measure. if it is below minTraining, stop() will return true | |
std::queue< double > | m_interval |
current interval | |
size_t | m_intervalSize |
size of the interval | |
This stopping criterion tracks the improvement of the training error over an interval of iterations.
If the mean performance over this strip divided by the minimum is too low, training is stopped. The difference to TrainingError is, that this class tests the relative improvement of the error compared to the minimum training error, while the TrainingError measures the absolute difference. This class is a bit better tuned to noisy error functions since it takes the mean of the interval as comparison.
Terminology for this and other stopping criteria is taken from (and also see):
Lutz Prechelt. Early Stopping - but when? In Genevieve B. Orr and Klaus-Robert Müller: Neural Networks: Tricks of the Trade, volume 1524 of LNCS, Springer, 1997.
Definition at line 59 of file TrainingProgress.h.
typedef SingleObjectiveResultSet<PointType> shark::TrainingProgress< PointType >::ResultSet |
Definition at line 61 of file TrainingProgress.h.
|
inline |
constructs the TrainingProgress
intervalSize | the size of the interval which is checked |
minImprovement | minimum relative improvement of the interval to the minimum training error before training stops |
Definition at line 65 of file TrainingProgress.h.
References shark::TrainingProgress< PointType >::m_intervalSize, shark::TrainingProgress< PointType >::m_minImprovement, and shark::TrainingProgress< PointType >::reset().
|
inlinevirtual |
resets the internal state
Implements shark::AbstractStoppingCriterion< ResultSetT >.
Definition at line 90 of file TrainingProgress.h.
References shark::TrainingProgress< PointType >::m_interval, shark::TrainingProgress< PointType >::m_meanPerformance, shark::TrainingProgress< PointType >::m_minTraining, and shark::TrainingProgress< PointType >::m_progress.
Referenced by shark::TrainingProgress< PointType >::TrainingProgress().
|
inline |
returns true if training should stop
Definition at line 71 of file TrainingProgress.h.
References shark::TrainingProgress< PointType >::m_interval, shark::TrainingProgress< PointType >::m_intervalSize, shark::TrainingProgress< PointType >::m_meanPerformance, shark::TrainingProgress< PointType >::m_minImprovement, shark::TrainingProgress< PointType >::m_minTraining, shark::TrainingProgress< PointType >::m_progress, and shark::ResultSet< SearchPointT, ResultT >::value.
|
inline |
returns current value of progress
Definition at line 97 of file TrainingProgress.h.
References shark::TrainingProgress< PointType >::m_progress.
|
protected |
current interval
Definition at line 111 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::reset(), and shark::TrainingProgress< PointType >::stop().
|
protected |
size of the interval
Definition at line 113 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::stop(), and shark::TrainingProgress< PointType >::TrainingProgress().
|
protected |
mean performance over the last intervalSize timesteps
Definition at line 106 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::reset(), and shark::TrainingProgress< PointType >::stop().
|
protected |
minimum improvement allowed before training stops
Definition at line 104 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::stop(), and shark::TrainingProgress< PointType >::TrainingProgress().
|
protected |
minimum training error encountered
Definition at line 102 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::reset(), and shark::TrainingProgress< PointType >::stop().
|
protected |
current progress measure. if it is below minTraining, stop() will return true
Definition at line 108 of file TrainingProgress.h.
Referenced by shark::TrainingProgress< PointType >::reset(), shark::TrainingProgress< PointType >::stop(), and shark::TrainingProgress< PointType >::value().