![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Approximation Scheme. More...
#include <IApproximationSchemeConfiguration.h>
Public Attributes | |
Signaler3< Size, double, double > | onProgress |
Progression, error and time. More... | |
Signaler1< std::string > | onStop |
Criteria messageApproximationScheme. More... | |
Public Member Functions | |
Constructor and destructor | |
IApproximationSchemeConfiguration () | |
Class constructors. More... | |
~IApproximationSchemeConfiguration () | |
Class destructor. More... | |
Getters and setters | |
std::string | messageApproximationScheme () const |
Returns the approximation scheme message. More... | |
virtual void | setEpsilon (double eps)=0 |
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|. More... | |
virtual double | epsilon () const =0 |
Returns the value of epsilon. More... | |
virtual void | disableEpsilon ()=0 |
Disable stopping criterion on epsilon. More... | |
virtual void | enableEpsilon ()=0 |
Enable stopping criterion on epsilon. More... | |
virtual bool | isEnabledEpsilon () const =0 |
Returns true if stopping criterion on epsilon is enabled, false otherwise. More... | |
virtual void | setMinEpsilonRate (double rate)=0 |
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|). More... | |
virtual double | minEpsilonRate () const =0 |
Returns the value of the minimal epsilon rate. More... | |
virtual void | disableMinEpsilonRate ()=0 |
Disable stopping criterion on epsilon rate. More... | |
virtual void | enableMinEpsilonRate ()=0 |
Enable stopping criterion on epsilon rate. More... | |
virtual bool | isEnabledMinEpsilonRate () const =0 |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise. More... | |
virtual void | setMaxIter (Size max)=0 |
Stopping criterion on number of iterations. More... | |
virtual Size | maxIter () const =0 |
Returns the criterion on number of iterations. More... | |
virtual void | disableMaxIter ()=0 |
Disable stopping criterion on max iterations. More... | |
virtual void | enableMaxIter ()=0 |
Enable stopping criterion on max iterations. More... | |
virtual bool | isEnabledMaxIter () const =0 |
Returns true if stopping criterion on max iterations is enabled, false otherwise. More... | |
virtual void | setMaxTime (double timeout)=0 |
Stopping criterion on timeout. More... | |
virtual double | maxTime () const =0 |
Returns the timeout (in seconds). More... | |
virtual double | currentTime () const =0 |
Returns the current running time in second. More... | |
virtual void | disableMaxTime ()=0 |
Disable stopping criterion on timeout. More... | |
virtual void | enableMaxTime ()=0 |
Enable stopping criterion on timeout. More... | |
virtual bool | isEnabledMaxTime () const =0 |
Returns true if stopping criterion on timeout is enabled, false otherwise. More... | |
virtual void | setPeriodSize (Size p)=0 |
How many samples between two stopping is enable. More... | |
virtual Size | periodSize () const =0 |
Returns the period size. More... | |
virtual void | setVerbosity (bool v)=0 |
Set the verbosity on (true) or off (false). More... | |
virtual bool | verbosity () const =0 |
Returns true if verbosity is enabled. More... | |
virtual ApproximationSchemeSTATE | stateApproximationScheme () const =0 |
Returns the approximation scheme state. More... | |
virtual Size | nbrIterations () const =0 |
Returns the number of iterations. More... | |
virtual const std::vector< double > & | history () const =0 |
Returns the scheme history. More... | |
Public Types | |
enum | ApproximationSchemeSTATE : char { ApproximationSchemeSTATE::Undefined, ApproximationSchemeSTATE::Continue, ApproximationSchemeSTATE::Epsilon, ApproximationSchemeSTATE::Rate, ApproximationSchemeSTATE::Limit, ApproximationSchemeSTATE::TimeLimit, ApproximationSchemeSTATE::Stopped } |
The different state of an approximation scheme. More... | |
Approximation Scheme.
An interface for configuration of approximation scheme.
Definition at line 55 of file IApproximationSchemeConfiguration.h.
|
strong |
The different state of an approximation scheme.
Enumerator | |
---|---|
Undefined | |
Continue | |
Epsilon | |
Rate | |
Limit | |
TimeLimit | |
Stopped |
Definition at line 64 of file IApproximationSchemeConfiguration.h.
gum::IApproximationSchemeConfiguration::IApproximationSchemeConfiguration | ( | ) |
Class constructors.
Definition at line 36 of file IApproximationSchemeConfiguration.cpp.
References gum::Set< Key, Alloc >::emplace().
gum::IApproximationSchemeConfiguration::~IApproximationSchemeConfiguration | ( | ) |
Class destructor.
Definition at line 40 of file IApproximationSchemeConfiguration.cpp.
References gum::Set< Key, Alloc >::emplace().
|
pure virtual |
Returns the current running time in second.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Disable stopping criterion on epsilon.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Disable stopping criterion on max iterations.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Disable stopping criterion on timeout.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Disable stopping criterion on epsilon rate.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Enable stopping criterion on epsilon.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Enable stopping criterion on max iterations.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Enable stopping criterion on timeout.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Enable stopping criterion on epsilon rate.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the value of epsilon.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the scheme history.
OperationNotAllowed | Raised if the scheme did not performed or if verbosity is set to false. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns true if stopping criterion on epsilon is enabled, false otherwise.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns true if stopping criterion on max iterations is enabled, false otherwise.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns true if stopping criterion on timeout is enabled, false otherwise.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the criterion on number of iterations.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the timeout (in seconds).
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
INLINE std::string gum::IApproximationSchemeConfiguration::messageApproximationScheme | ( | ) | const |
Returns the approximation scheme message.
Definition at line 38 of file IApproximationSchemeConfiguration_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
pure virtual |
Returns the value of the minimal epsilon rate.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the number of iterations.
OperationNotAllowed | Raised if the scheme did not perform. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the period size.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|.
If the criterion was disabled it will be enabled.
eps | The new epsilon value. |
OutOfLowerBound | Raised if eps < 0. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Stopping criterion on number of iterations.
If the criterion was disabled it will be enabled.
max | The maximum number of iterations. |
OutOfLowerBound | Raised if max <= 1. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Stopping criterion on timeout.
If the criterion was disabled it will be enabled.
timeout | The timeout value in seconds. |
OutOfLowerBound | Raised if timeout <= 0.0. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|).
If the criterion was disabled it will be enabled
rate | The minimal epsilon rate. |
OutOfLowerBound | if rate<0 |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
How many samples between two stopping is enable.
p | The new period value. |
OutOfLowerBound | Raised if p < 1. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Set the verbosity on (true) or off (false).
v | If true, then verbosity is turned on. |
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns the approximation scheme state.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
|
pure virtual |
Returns true if verbosity is enabled.
Implemented in gum::learning::genericBNLearner, and gum::ApproximationScheme.
Progression, error and time.
Definition at line 58 of file IApproximationSchemeConfiguration.h.
Signaler1< std::string > gum::IApproximationSchemeConfiguration::onStop |
Criteria messageApproximationScheme.
Definition at line 61 of file IApproximationSchemeConfiguration.h.