SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
python.learner.TrainingStopPolicy.TrainingStopPolicy Class Reference

The class implements heuristics for testing if the learn process should be finished before learner is overfitted. More...

Inheritance diagram for python.learner.TrainingStopPolicy.TrainingStopPolicy:

Public Member Functions

 __init__ (self)
 Contructor.
 
 fromJson (cls, jsonObject)
 Restores the TrainingStopPolicy object from the json object with attributes.
 
 getAccuracyLimit (self)
 Returns the accuracy on validation data, that have to be achieved.
 
 getAdaptiveIterationLimit (self)
 Returns the maximal number of refinement iterations.
 
 getEpochsLimit (self)
 Returns the maximal number of iterations, during which accuracy can decreases.
 
 getGridSize (self, learner)
 
 getGridSizeLimit (self)
 Returns the maximal grid size.
 
 getMSELimit (self)
 Returns MSE on validation data, that have to be achieved.
 
 hasGridSizeChanged (self, learner)
 
 hasLimitReached (self, learner)
 
 isTrainingComplete (self, learner)
 Checks if learning process have to be stopped.
 
 setAccuracyLimit (self, limit)
 Setter for accuracy limit.
 
 setAdaptiveIterationLimit (self, limit)
 
 setEpochsLimit (self, limit)
 Setter for epochs limit.
 
 setGridSizeLimit (self, limit)
 Setter for maximal grid size.
 
 setMSELimit (self, limit)
 Setter for MSE limit.
 
 toString (self)
 Returns a string that represents the object.
 

Detailed Description

The class implements heuristics for testing if the learn process should be finished before learner is overfitted.

The test is made by calling method isTrainingComplete(learner) of the class, which returns True if training process should be finished.

Constructor & Destructor Documentation

◆ __init__()

python.learner.TrainingStopPolicy.TrainingStopPolicy.__init__ (   self)

Contructor.

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__accuracyLimit, python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__accuracyLimit, python.learner.TrainingStopPolicy.TrainingStopPolicy.__adaptiveIterationLimit, python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__adaptiveIterationLimit, python.learner.TrainingStopPolicy.TrainingStopPolicy.__epochsLimit, python.learner.TrainingStopPolicy.TrainingStopPolicy.__gridSizeLimit, python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__gridSizeLimit, python.learner.TrainingStopPolicy.TrainingStopPolicy.__MSELimit, python.learner.TrainingStopPolicy.TrainingStopPolicy.__oldGridSize, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__oldGridSize.

Member Function Documentation

◆ fromJson()

python.learner.TrainingStopPolicy.TrainingStopPolicy.fromJson (   cls,
  jsonObject 
)

Restores the TrainingStopPolicy object from the json object with attributes.

Parameters
clspython keyword (do not specify)
jsonObjectA json object.
Returns
The restored TrainingStopPolicy object.

Referenced by python.learner.Learner.Learner.setMemento(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setMemento(), python.uq.learner.Learner.Learner.setMemento(), python.uq.sampler.asgc.ASGCSampler.ASGCSampler.setMemento(), and python.uq.uq_setting.UQSetting.UQSetting.setMemento().

◆ getAccuracyLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getAccuracyLimit (   self)

Returns the accuracy on validation data, that have to be achieved.

Returns
: accuracy on validation data, that have to be achieved

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__accuracyLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__accuracyLimit.

◆ getAdaptiveIterationLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getAdaptiveIterationLimit (   self)

Returns the maximal number of refinement iterations.

Returns
: the maximal number of refinement iterations

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__adaptiveIterationLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__adaptiveIterationLimit.

◆ getEpochsLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getEpochsLimit (   self)

Returns the maximal number of iterations, during which accuracy can decreases.

Returns
: the maximal number of iterations, during which accuracy can decreases

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__epochsLimit.

◆ getGridSize()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getGridSize (   self,
  learner 
)

◆ getGridSizeLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getGridSizeLimit (   self)

Returns the maximal grid size.

Returns
: maximal grid size

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__gridSizeLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__gridSizeLimit.

Referenced by python.learner.TrainingStopPolicy.TrainingStopPolicy.hasLimitReached(), and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.hasLimitReached().

◆ getMSELimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.getMSELimit (   self)

Returns MSE on validation data, that have to be achieved.

Returns
: MSE on validation data, that have to be achieved

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__MSELimit.

Referenced by python.learner.TrainingStopPolicy.TrainingStopPolicy.hasLimitReached().

◆ hasGridSizeChanged()

python.learner.TrainingStopPolicy.TrainingStopPolicy.hasGridSizeChanged (   self,
  learner 
)

◆ hasLimitReached()

python.learner.TrainingStopPolicy.TrainingStopPolicy.hasLimitReached (   self,
  learner 
)

◆ isTrainingComplete()

python.learner.TrainingStopPolicy.TrainingStopPolicy.isTrainingComplete (   self,
  learner 
)

◆ setAccuracyLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.setAccuracyLimit (   self,
  limit 
)

Setter for accuracy limit.

Parameters
limitdouble accuracy on validation data, that have to be achieved

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__accuracyLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__accuracyLimit.

◆ setAdaptiveIterationLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.setAdaptiveIterationLimit (   self,
  limit 
)

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__adaptiveIterationLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__adaptiveIterationLimit.

◆ setEpochsLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.setEpochsLimit (   self,
  limit 
)

Setter for epochs limit.

Parameters
limitinteger Maximal number of iterations, during which accuracy can decreases

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__epochsLimit.

◆ setGridSizeLimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.setGridSizeLimit (   self,
  limit 
)

Setter for maximal grid size.

Parameters
limitinteger maximal grid size

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__gridSizeLimit, and python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.__gridSizeLimit.

◆ setMSELimit()

python.learner.TrainingStopPolicy.TrainingStopPolicy.setMSELimit (   self,
  limit 
)

Setter for MSE limit.

Parameters
limitdouble minimal MSE on validation data, that have to be achieved

References python.learner.TrainingStopPolicy.TrainingStopPolicy.__MSELimit.

◆ toString()


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