SG++-Doxygen-Documentation
sgpp::datadriven::RefinementMonitorConvergence Class Reference

A monitor to decide if a learning algorithm has converged. More...

#include <RefinementMonitorConvergence.hpp>

Inheritance diagram for sgpp::datadriven::RefinementMonitorConvergence:
sgpp::datadriven::RefinementMonitor

Public Member Functions

void pushToBuffer (size_t numberInstances, double currentValidError, double currentTrainError) override
 Stores the current error values in the buffer. More...
 
 RefinementMonitorConvergence (double pDeclineThreshold, size_t pBufferSize, size_t pMinRefInterval)
 Constructor. More...
 
size_t refinementsNecessary () override
 Checks if the model needs to be refined. More...
 
virtual ~RefinementMonitorConvergence ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::datadriven::RefinementMonitor
virtual ~RefinementMonitor ()=default
 Destructor. More...
 

Detailed Description

A monitor to decide if a learning algorithm has converged.

The convergence criterion is based on the comparison of error measurements throughout the training process.

Constructor & Destructor Documentation

◆ RefinementMonitorConvergence()

sgpp::datadriven::RefinementMonitorConvergence::RefinementMonitorConvergence ( double  pDeclineThreshold,
size_t  pBufferSize,
size_t  pMinRefInterval 
)

Constructor.

Parameters
pDeclineThresholdThe convergence threshold
pBufferSizeNumber of error measurements which are considered for convergence check
pMinRefIntervalMinimum number of iterations before next refinement is allowed to be performed

◆ ~RefinementMonitorConvergence()

sgpp::datadriven::RefinementMonitorConvergence::~RefinementMonitorConvergence ( )
virtual

Destructor.

Member Function Documentation

◆ pushToBuffer()

void sgpp::datadriven::RefinementMonitorConvergence::pushToBuffer ( size_t  numberInstances,
double  currentValidError,
double  currentTrainError 
)
overridevirtual

Stores the current error values in the buffer.

If the buffer has reached the maximum size, the oldest values are removed.

Parameters
numberInstancesthe number of instances that were used for the training step
currentValidErrorThe current validation error
currentTrainErrorThe current training error

Implements sgpp::datadriven::RefinementMonitor.

◆ refinementsNecessary()

size_t sgpp::datadriven::RefinementMonitorConvergence::refinementsNecessary ( )
overridevirtual

Checks if the model needs to be refined.

The convergence based monitor will at most trigger one refinement at once.

Returns
the number of refinements that are triggered by the monitor

Implements sgpp::datadriven::RefinementMonitor.


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