shark::GeneralizationQuotient< PointType > Class Template Reference

SStopping criterion monitoring the quotient of generalization loss and training progress. More...

#include <shark/Algorithms/StoppingCriteria/GeneralizationQuotient.h>

+ Inheritance diagram for shark::GeneralizationQuotient< PointType >:

Public Types

typedef ValidatedSingleObjectiveResultSet< PointType > ResultSet
 
- Public Types inherited from shark::AbstractStoppingCriterion< ValidatedSingleObjectiveResultSet< PointType > >
typedef ValidatedSingleObjectiveResultSet< PointType > ResultSet
 

Public Member Functions

 GeneralizationQuotient (std::size_t intervalSize, double maxLoss)
 
bool stop (ResultSet const &set)
 returns true if training should stop More...
 
void reset ()
 resets the internal state. call before a new trial More...
 

Protected Attributes

double m_minTraining
 
double m_maxLoss
 
double m_meanPerformance
 
std::queue< double > m_interval
 
std::size_t m_intervalSize
 

Detailed Description

template<class PointType = RealVector>
class shark::GeneralizationQuotient< PointType >

SStopping criterion monitoring the quotient of generalization loss and training progress.

The GeneralizationQuotient is, as the name suggests, a quotient of two other stopping criteria, namely the generalization loss and theThis stopping criterion is based on the empirical fact that the generalization error does not have a smooth surface. It is normal that during periods of fast learning the generalization loss might increase first and than decrease again. This class calculates the quotient of training progress and generalization loss. It stops if it is bigger than maxloss > 0. 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 69 of file GeneralizationQuotient.h.

Member Typedef Documentation

◆ ResultSet

template<class PointType = RealVector>
typedef ValidatedSingleObjectiveResultSet<PointType> shark::GeneralizationQuotient< PointType >::ResultSet

Definition at line 73 of file GeneralizationQuotient.h.

Constructor & Destructor Documentation

◆ GeneralizationQuotient()

Member Function Documentation

◆ reset()

template<class PointType = RealVector>
void shark::GeneralizationQuotient< PointType >::reset ( )
inlinevirtual

◆ stop()

template<class PointType = RealVector>
bool shark::GeneralizationQuotient< PointType >::stop ( ResultSet const &  set)
inlinevirtual

Member Data Documentation

◆ m_interval

template<class PointType = RealVector>
std::queue<double> shark::GeneralizationQuotient< PointType >::m_interval
protected

◆ m_intervalSize

template<class PointType = RealVector>
std::size_t shark::GeneralizationQuotient< PointType >::m_intervalSize
protected

◆ m_maxLoss

template<class PointType = RealVector>
double shark::GeneralizationQuotient< PointType >::m_maxLoss
protected

◆ m_meanPerformance

template<class PointType = RealVector>
double shark::GeneralizationQuotient< PointType >::m_meanPerformance
protected

Definition at line 107 of file GeneralizationQuotient.h.

◆ m_minTraining

template<class PointType = RealVector>
double shark::GeneralizationQuotient< PointType >::m_minTraining
protected

The documentation for this class was generated from the following file: