![]() |
aGrUM
0.16.0
|
Abstract class template representing a CredalNet inference engine. More...
#include <agrum/CN/inferenceEngine.h>
Public Attributes | |
Signaler3< Size, double, double > | onProgress |
Progression, error and time. More... | |
Signaler1< std::string > | onStop |
Criteria messageApproximationScheme. More... | |
Public Member Functions | |
Constructors / Destructors | |
InferenceEngine (const CredalNet< GUM_SCALAR > &credalNet) | |
Construtor. More... | |
virtual | ~InferenceEngine () |
Destructor. More... | |
Pure virtual methods | |
virtual void | makeInference ()=0 |
To be redefined by each credal net algorithm. More... | |
Getters and setters | |
VarMod2BNsMap< GUM_SCALAR > * | getVarMod2BNsMap () |
Get optimum IBayesNet. More... | |
const CredalNet< GUM_SCALAR > & | credalNet () |
Get this creadal network. More... | |
const NodeProperty< std::vector< NodeId > > & | getT0Cluster () const |
Get the _t0 cluster. More... | |
const NodeProperty< std::vector< NodeId > > & | getT1Cluster () const |
Get the _t1 cluster. More... | |
void | setRepetitiveInd (const bool repetitive) |
void | storeVertices (const bool value) |
void | storeBNOpt (const bool value) |
bool | repetitiveInd () const |
Get the current independence status. More... | |
bool | storeVertices () const |
Get the number of iterations without changes used to stop some algorithms. More... | |
bool | storeBNOpt () const |
Pre-inference initialization methods | |
void | insertModalsFile (const std::string &path) |
Insert variables modalities from file to compute expectations. More... | |
void | insertModals (const std::map< std::string, std::vector< GUM_SCALAR > > &modals) |
Insert variables modalities from map to compute expectations. More... | |
virtual void | insertEvidenceFile (const std::string &path) |
Insert evidence from file. More... | |
void | insertEvidence (const std::map< std::string, std::vector< GUM_SCALAR > > &eviMap) |
Insert evidence from map. More... | |
void | insertEvidence (const NodeProperty< std::vector< GUM_SCALAR > > &evidence) |
Insert evidence from Property. More... | |
void | insertQueryFile (const std::string &path) |
Insert query variables states from file. More... | |
void | insertQuery (const NodeProperty< std::vector< bool > > &query) |
Insert query variables and states from Property. More... | |
Post-inference methods | |
virtual void | eraseAllEvidence () |
Erase all inference related data to perform another one. More... | |
const std::vector< GUM_SCALAR > & | marginalMin (const NodeId id) const |
Get the lower marginals of a given node id. More... | |
const std::vector< GUM_SCALAR > & | marginalMax (const NodeId id) const |
Get the upper marginals of a given node id. More... | |
const std::vector< GUM_SCALAR > & | marginalMin (const std::string &varName) const |
Get the lower marginals of a given variable name. More... | |
const std::vector< GUM_SCALAR > & | marginalMax (const std::string &varName) const |
Get the upper marginals of a given variable name. More... | |
const GUM_SCALAR & | expectationMin (const NodeId id) const |
Get the lower expectation of a given node id. More... | |
const GUM_SCALAR & | expectationMax (const NodeId id) const |
Get the upper expectation of a given node id. More... | |
const GUM_SCALAR & | expectationMin (const std::string &varName) const |
Get the lower expectation of a given variable name. More... | |
const GUM_SCALAR & | expectationMax (const std::string &varName) const |
Get the upper expectation of a given variable name. More... | |
const std::vector< GUM_SCALAR > & | dynamicExpMin (const std::string &varName) const |
Get the lower dynamic expectation of a given variable prefix (without the time step included, i.e. More... | |
const std::vector< GUM_SCALAR > & | dynamicExpMax (const std::string &varName) const |
Get the upper dynamic expectation of a given variable prefix (without the time step included, i.e. More... | |
const std::vector< std::vector< GUM_SCALAR > > & | vertices (const NodeId id) const |
Get the vertice of a given node id. More... | |
void | saveMarginals (const std::string &path) const |
Saves marginals to file. More... | |
void | saveExpectations (const std::string &path) const |
Saves expectations to file. More... | |
void | saveVertices (const std::string &path) const |
Saves vertices to file. More... | |
void | dynamicExpectations () |
Compute dynamic expectations. More... | |
std::string | toString () const |
Print all nodes marginals to standart output. More... | |
const std::string | getApproximationSchemeMsg () |
Get approximation scheme state. More... | |
Getters and setters | |
void | setEpsilon (double eps) |
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|. More... | |
double | epsilon () const |
Returns the value of epsilon. More... | |
void | disableEpsilon () |
Disable stopping criterion on epsilon. More... | |
void | enableEpsilon () |
Enable stopping criterion on epsilon. More... | |
bool | isEnabledEpsilon () const |
Returns true if stopping criterion on epsilon is enabled, false otherwise. More... | |
void | setMinEpsilonRate (double rate) |
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|). More... | |
double | minEpsilonRate () const |
Returns the value of the minimal epsilon rate. More... | |
void | disableMinEpsilonRate () |
Disable stopping criterion on epsilon rate. More... | |
void | enableMinEpsilonRate () |
Enable stopping criterion on epsilon rate. More... | |
bool | isEnabledMinEpsilonRate () const |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise. More... | |
void | setMaxIter (Size max) |
Stopping criterion on number of iterations. More... | |
Size | maxIter () const |
Returns the criterion on number of iterations. More... | |
void | disableMaxIter () |
Disable stopping criterion on max iterations. More... | |
void | enableMaxIter () |
Enable stopping criterion on max iterations. More... | |
bool | isEnabledMaxIter () const |
Returns true if stopping criterion on max iterations is enabled, false otherwise. More... | |
void | setMaxTime (double timeout) |
Stopping criterion on timeout. More... | |
double | maxTime () const |
Returns the timeout (in seconds). More... | |
double | currentTime () const |
Returns the current running time in second. More... | |
void | disableMaxTime () |
Disable stopping criterion on timeout. More... | |
void | enableMaxTime () |
Enable stopping criterion on timeout. More... | |
bool | isEnabledMaxTime () const |
Returns true if stopping criterion on timeout is enabled, false otherwise. More... | |
void | setPeriodSize (Size p) |
How many samples between two stopping is enable. More... | |
Size | periodSize () const |
Returns the period size. More... | |
void | setVerbosity (bool v) |
Set the verbosity on (true) or off (false). More... | |
bool | verbosity () const |
Returns true if verbosity is enabled. More... | |
ApproximationSchemeSTATE | stateApproximationScheme () const |
Returns the approximation scheme state. More... | |
Size | nbrIterations () const |
Returns the number of iterations. More... | |
const std::vector< double > & | history () const |
Returns the scheme history. More... | |
void | initApproximationScheme () |
Initialise the scheme. More... | |
bool | startOfPeriod () |
Returns true if we are at the beginning of a period (compute error is mandatory). More... | |
void | updateApproximationScheme (unsigned int incr=1) |
Update the scheme w.r.t the new error and increment steps. More... | |
Size | remainingBurnIn () |
Returns the remaining burn in. More... | |
void | stopApproximationScheme () |
Stop the approximation scheme. More... | |
bool | continueApproximationScheme (double error) |
Update the scheme w.r.t the new error. More... | |
Getters and setters | |
std::string | messageApproximationScheme () const |
Returns the approximation scheme message. 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... | |
Protected Attributes | |
const CredalNet< GUM_SCALAR > * | _credalNet |
A pointer to the Credal Net used. More... | |
margi | _oldMarginalMin |
Old lower marginals used to compute epsilon. More... | |
margi | _oldMarginalMax |
Old upper marginals used to compute epsilon. More... | |
margi | _marginalMin |
Lower marginals. More... | |
margi | _marginalMax |
Upper marginals. More... | |
credalSet | _marginalSets |
Credal sets vertices, if enabled. More... | |
expe | _expectationMin |
Lower expectations, if some variables modalities were inserted. More... | |
expe | _expectationMax |
Upper expectations, if some variables modalities were inserted. More... | |
dynExpe | _dynamicExpMin |
Lower dynamic expectations. More... | |
dynExpe | _dynamicExpMax |
Upper dynamic expectations. More... | |
dynExpe | _modal |
Variables modalities used to compute expectations. More... | |
margi | _evidence |
Holds observed variables states. More... | |
query | _query |
Holds the query nodes states. More... | |
cluster | _t0 |
Clusters of nodes used with dynamic networks. More... | |
cluster | _t1 |
Clusters of nodes used with dynamic networks. More... | |
bool | _storeVertices |
True if credal sets vertices are stored, False otherwise. More... | |
bool | _repetitiveInd |
True if using repetitive independence ( dynamic network only ), False otherwise. More... | |
bool | _storeBNOpt |
Iterations limit stopping rule used by some algorithms such as CNMonteCarloSampling. More... | |
VarMod2BNsMap< GUM_SCALAR > | _dbnOpt |
Object used to efficiently store optimal bayes net during inference, for some algorithms. More... | |
int | _timeSteps |
The number of time steps of this network (only usefull for dynamic networks). More... | |
double | _current_epsilon |
Current epsilon. More... | |
double | _last_epsilon |
Last epsilon value. More... | |
double | _current_rate |
Current rate. More... | |
Size | _current_step |
The current step. More... | |
Timer | _timer |
The timer. More... | |
ApproximationSchemeSTATE | _current_state |
The current state. More... | |
std::vector< double > | _history |
The scheme history, used only if verbosity == true. More... | |
double | _eps |
Threshold for convergence. More... | |
bool | _enabled_eps |
If true, the threshold convergence is enabled. More... | |
double | _min_rate_eps |
Threshold for the epsilon rate. More... | |
bool | _enabled_min_rate_eps |
If true, the minimal threshold for epsilon rate is enabled. More... | |
double | _max_time |
The timeout. More... | |
bool | _enabled_max_time |
If true, the timeout is enabled. More... | |
Size | _max_iter |
The maximum iterations. More... | |
bool | _enabled_max_iter |
If true, the maximum iterations stopping criterion is enabled. More... | |
Size | _burn_in |
Number of iterations before checking stopping criteria. More... | |
Size | _period_size |
Checking criteria frequency. More... | |
bool | _verbosity |
If true, verbosity is enabled. More... | |
Protected Member Functions | |
Protected initialization methods | |
void | _repetitiveInit () |
Initialize _t0 and _t1 clusters. More... | |
void | _initExpectations () |
Initialize lower and upper expectations before inference, with the lower expectation being initialized on the highest modality and the upper expectation being initialized on the lowest modality. More... | |
void | _initMarginals () |
Initialize lower and upper old marginals and marginals before inference, with the lower marginal being 1 and the upper 0. More... | |
void | _initMarginalSets () |
Initialize credal set vertices with empty sets. More... | |
Protected algorithms methods | |
const GUM_SCALAR | _computeEpsilon () |
Compute approximation scheme epsilon using the old marginals and the new ones. More... | |
void | _updateExpectations (const NodeId &id, const std::vector< GUM_SCALAR > &vertex) |
Given a node id and one of it's possible vertex obtained during inference, update this node lower and upper expectations. More... | |
void | _updateCredalSets (const NodeId &id, const std::vector< GUM_SCALAR > &vertex, const bool &elimRedund=false) |
Given a node id and one of it's possible vertex, update it's credal set. More... | |
Proptected post-inference methods | |
void | _dynamicExpectations () |
Rearrange lower and upper expectations to suit dynamic networks. More... | |
Abstract class template representing a CredalNet inference engine.
Used by credal network inference algorithms such as CNLoopyPropagation (inner multi-threading) or CNMonteCarloSampling (outer multi-threading).
GUM_SCALAR | A floating type ( float, double, long double ... ). |
Definition at line 59 of file inferenceEngine.h.
|
private |
Definition at line 70 of file inferenceEngine.h.
|
private |
Definition at line 62 of file inferenceEngine.h.
|
private |
Definition at line 67 of file inferenceEngine.h.
|
private |
Definition at line 64 of file inferenceEngine.h.
|
private |
Definition at line 63 of file inferenceEngine.h.
|
private |
Definition at line 69 of file inferenceEngine.h.
|
stronginherited |
The different state of an approximation scheme.
Enumerator | |
---|---|
Undefined | |
Continue | |
Epsilon | |
Rate | |
Limit | |
TimeLimit | |
Stopped |
Definition at line 65 of file IApproximationSchemeConfiguration.h.
|
explicit |
Construtor.
credalNet | The credal net to be used with this inference engine. |
Definition at line 41 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_dbnOpt, gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), and gum::credal::InferenceEngine< GUM_SCALAR >::credalNet().
|
virtual |
Destructor.
Definition at line 54 of file inferenceEngine_tpl.h.
|
inlineprotected |
Compute approximation scheme epsilon using the old marginals and the new ones.
Highest delta on either lower or upper marginal is epsilon.
Also updates oldMarginals to current marginals.
Definition at line 1016 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin, gum::credal::InferenceEngine< GUM_SCALAR >::_oldMarginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_oldMarginalMin, and gum::HashTable< Key, Val, Alloc >::size().
|
protected |
Rearrange lower and upper expectations to suit dynamic networks.
Definition at line 721 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMax, gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMin, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMax, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMin, gum::credal::InferenceEngine< GUM_SCALAR >::_modal, and gum::HashTable< Key, Val, Alloc >::empty().
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpectations(), and gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference().
|
protected |
Initialize lower and upper expectations before inference, with the lower expectation being initialized on the highest modality and the upper expectation being initialized on the lowest modality.
Definition at line 695 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMax, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMin, gum::credal::InferenceEngine< GUM_SCALAR >::_modal, gum::HashTable< Key, Val, Alloc >::clear(), and gum::HashTable< Key, Val, Alloc >::insert().
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), gum::credal::InferenceEngine< GUM_SCALAR >::insertModals(), and gum::credal::InferenceEngine< GUM_SCALAR >::insertModalsFile().
|
protected |
Initialize lower and upper old marginals and marginals before inference, with the lower marginal being 1 and the upper 0.
Definition at line 663 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin, gum::credal::InferenceEngine< GUM_SCALAR >::_oldMarginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_oldMarginalMin, gum::HashTable< Key, Val, Alloc >::clear(), and gum::HashTable< Key, Val, Alloc >::insert().
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), and gum::credal::InferenceEngine< GUM_SCALAR >::InferenceEngine().
|
protected |
Initialize credal set vertices with empty sets.
Definition at line 680 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalSets, gum::credal::InferenceEngine< GUM_SCALAR >::_storeVertices, gum::HashTable< Key, Val, Alloc >::clear(), and gum::HashTable< Key, Val, Alloc >::insert().
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), and gum::credal::InferenceEngine< GUM_SCALAR >::storeVertices().
|
protected |
Initialize _t0 and _t1 clusters.
Definition at line 784 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_t0, gum::credal::InferenceEngine< GUM_SCALAR >::_t1, gum::credal::InferenceEngine< GUM_SCALAR >::_timeSteps, gum::HashTable< Key, Val, Alloc >::clear(), GUM_ERROR, and gum::HashTable< Key, Val, Alloc >::insert().
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference(), and gum::credal::InferenceEngine< GUM_SCALAR >::setRepetitiveInd().
|
inlineprotected |
Given a node id and one of it's possible vertex, update it's credal set.
To maximise efficiency, don't pass a vertex we know is inside the polytope (i.e. not at an extreme value for any modality)
id | The id of the node to be updated |
vertex | A (potential) vertex of the node credal set |
elimRedund | remove redundant vertex (inside a facet) |
Definition at line 928 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalSets, gum::HashTable< Key, Val, Alloc >::cbegin(), gum::HashTable< Key, Val, Alloc >::cend(), gum::credal::LRSWrapper< GUM_SCALAR >::elimRedundVrep(), gum::credal::LRSWrapper< GUM_SCALAR >::fillV(), gum::credal::LRSWrapper< GUM_SCALAR >::getOutput(), and gum::credal::LRSWrapper< GUM_SCALAR >::setUpV().
Referenced by gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_verticesFusion().
|
inlineprotected |
Given a node id and one of it's possible vertex obtained during inference, update this node lower and upper expectations.
id | The id of the node to be updated |
vertex | A (potential) vertex of the node credal set |
Definition at line 907 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMax, gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMin, and gum::credal::InferenceEngine< GUM_SCALAR >::_modal.
Update the scheme w.r.t the new error.
Test the stopping criterion that are enabled.
error | The new error value. |
OperationNotAllowed | Raised if state != ApproximationSchemeSTATE::Continue. |
Definition at line 227 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_epsilon, gum::ApproximationScheme::_current_rate, gum::ApproximationScheme::_current_state, gum::ApproximationScheme::_current_step, gum::ApproximationScheme::_enabled_eps, gum::ApproximationScheme::_enabled_max_iter, gum::ApproximationScheme::_enabled_max_time, gum::ApproximationScheme::_enabled_min_rate_eps, gum::ApproximationScheme::_eps, gum::ApproximationScheme::_history, gum::ApproximationScheme::_last_epsilon, gum::ApproximationScheme::_max_iter, gum::ApproximationScheme::_max_time, gum::ApproximationScheme::_min_rate_eps, gum::ApproximationScheme::_stopScheme(), gum::ApproximationScheme::_timer, gum::IApproximationSchemeConfiguration::Continue, gum::IApproximationSchemeConfiguration::Epsilon, GUM_EMIT3, GUM_ERROR, gum::IApproximationSchemeConfiguration::Limit, gum::IApproximationSchemeConfiguration::messageApproximationScheme(), gum::IApproximationSchemeConfiguration::onProgress, gum::IApproximationSchemeConfiguration::Rate, gum::ApproximationScheme::startOfPeriod(), gum::ApproximationScheme::stateApproximationScheme(), gum::Timer::step(), gum::IApproximationSchemeConfiguration::TimeLimit, and gum::ApproximationScheme::verbosity().
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), gum::SamplingInference< GUM_SCALAR >::_loopApproxInference(), gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), and gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference().
const CredalNet< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::credalNet | ( | ) |
Get this creadal network.
Definition at line 59 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet.
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::InferenceEngine().
|
virtualinherited |
Returns the current running time in second.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 128 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_timer, and gum::Timer::step().
Referenced by gum::learning::genericBNLearner::currentTime().
|
virtualinherited |
Disable stopping criterion on epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 54 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_eps.
Referenced by gum::learning::genericBNLearner::disableEpsilon().
|
virtualinherited |
Disable stopping criterion on max iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 105 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_iter.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcInitApproximationScheme(), gum::learning::genericBNLearner::disableMaxIter(), and gum::learning::GreedyHillClimbing::GreedyHillClimbing().
|
virtualinherited |
Disable stopping criterion on timeout.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 131 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_time.
Referenced by gum::learning::genericBNLearner::disableMaxTime(), and gum::learning::GreedyHillClimbing::GreedyHillClimbing().
|
virtualinherited |
Disable stopping criterion on epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 79 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_min_rate_eps.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcInitApproximationScheme(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), gum::learning::genericBNLearner::disableMinEpsilonRate(), and gum::learning::GreedyHillClimbing::GreedyHillClimbing().
void gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpectations | ( | ) |
Compute dynamic expectations.
Definition at line 716 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations().
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpMax | ( | const std::string & | varName | ) | const |
Get the upper dynamic expectation of a given variable prefix (without the time step included, i.e.
call with "temp" to get "temp_0", ..., "temp_T").
varName | The variable name prefix which upper expectation we want. |
Definition at line 504 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMax, and GUM_ERROR.
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpMin | ( | const std::string & | varName | ) | const |
Get the lower dynamic expectation of a given variable prefix (without the time step included, i.e.
call with "temp" to get "temp_0", ..., "temp_T").
varName | The variable name prefix which lower expectation we want. |
Definition at line 486 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMin, and GUM_ERROR.
|
virtualinherited |
Enable stopping criterion on epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 57 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_eps.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcInitApproximationScheme(), and gum::learning::genericBNLearner::enableEpsilon().
|
virtualinherited |
Enable stopping criterion on max iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 108 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_iter.
Referenced by gum::learning::genericBNLearner::enableMaxIter().
|
virtualinherited |
Enable stopping criterion on timeout.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 134 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_time.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), and gum::learning::genericBNLearner::enableMaxTime().
|
virtualinherited |
Enable stopping criterion on epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 84 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_min_rate_eps.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::learning::genericBNLearner::enableMinEpsilonRate().
|
virtualinherited |
Returns the value of epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 51 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_eps.
Referenced by gum::ImportanceSampling< GUM_SCALAR >::_onContextualize(), and gum::learning::genericBNLearner::epsilon().
|
virtual |
Erase all inference related data to perform another one.
You need to insert evidence again if needed but modalities are kept. You can insert new ones by using the appropriate method which will delete the old ones.
Reimplemented in gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >, and gum::credal::CNLoopyPropagation< GUM_SCALAR >.
Definition at line 64 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMax, gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMin, gum::credal::InferenceEngine< GUM_SCALAR >::_evidence, gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginalSets(), gum::credal::InferenceEngine< GUM_SCALAR >::_query, and gum::HashTable< Key, Val, Alloc >::clear().
Referenced by gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::eraseAllEvidence().
const GUM_SCALAR & gum::credal::InferenceEngine< GUM_SCALAR >::expectationMax | ( | const NodeId | id | ) | const |
Get the upper expectation of a given node id.
id | The node id which upper expectation we want. |
Definition at line 479 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMax.
const GUM_SCALAR & gum::credal::InferenceEngine< GUM_SCALAR >::expectationMax | ( | const std::string & | varName | ) | const |
Get the upper expectation of a given variable name.
varName | The variable name which upper expectation we want. |
Definition at line 462 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, and gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMax.
const GUM_SCALAR & gum::credal::InferenceEngine< GUM_SCALAR >::expectationMin | ( | const NodeId | id | ) | const |
Get the lower expectation of a given node id.
id | The node id which lower expectation we want. |
Definition at line 471 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMin.
const GUM_SCALAR & gum::credal::InferenceEngine< GUM_SCALAR >::expectationMin | ( | const std::string & | varName | ) | const |
Get the lower expectation of a given variable name.
varName | The variable name which lower expectation we want. |
Definition at line 454 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, and gum::credal::InferenceEngine< GUM_SCALAR >::_expectationMin.
|
inline |
Get approximation scheme state.
Definition at line 515 of file inferenceEngine.h.
References gum::IApproximationSchemeConfiguration::messageApproximationScheme().
const NodeProperty< std::vector< NodeId > > & gum::credal::InferenceEngine< GUM_SCALAR >::getT0Cluster | ( | ) | const |
Get the _t0 cluster.
Definition at line 1005 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_t0.
const NodeProperty< std::vector< NodeId > > & gum::credal::InferenceEngine< GUM_SCALAR >::getT1Cluster | ( | ) | const |
Get the _t1 cluster.
Definition at line 1011 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_t1.
VarMod2BNsMap< GUM_SCALAR > * gum::credal::InferenceEngine< GUM_SCALAR >::getVarMod2BNsMap | ( | ) |
Get optimum IBayesNet.
Definition at line 141 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dbnOpt.
|
virtualinherited |
Returns the scheme history.
OperationNotAllowed | Raised if the scheme did not performed or if verbosity is set to false. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 173 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_history, GUM_ERROR, gum::ApproximationScheme::stateApproximationScheme(), gum::IApproximationSchemeConfiguration::Undefined, and gum::ApproximationScheme::verbosity().
Referenced by gum::learning::genericBNLearner::history().
|
inherited |
Initialise the scheme.
Definition at line 187 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_epsilon, gum::ApproximationScheme::_current_rate, gum::ApproximationScheme::_current_state, gum::ApproximationScheme::_current_step, gum::ApproximationScheme::_history, gum::ApproximationScheme::_timer, gum::IApproximationSchemeConfiguration::Continue, and gum::Timer::reset().
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcInitApproximationScheme(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), gum::SamplingInference< GUM_SCALAR >::_loopApproxInference(), gum::SamplingInference< GUM_SCALAR >::_onStateChanged(), gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::learning::GreedyHillClimbing::learnStructure(), and gum::learning::LocalSearchWithTabuList::learnStructure().
void gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidence | ( | const std::map< std::string, std::vector< GUM_SCALAR > > & | eviMap | ) |
Insert evidence from map.
eviMap | The map variable name - likelihood. |
Definition at line 229 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_evidence, gum::HashTable< Key, Val, Alloc >::clear(), gum::HashTable< Key, Val, Alloc >::empty(), GUM_SHOWERROR, and gum::HashTable< Key, Val, Alloc >::insert().
void gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidence | ( | const NodeProperty< std::vector< GUM_SCALAR > > & | evidence | ) |
Insert evidence from Property.
evidence | The on nodes Property containing likelihoods. |
Definition at line 251 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_evidence, gum::HashTable< Key, Val, Alloc >::clear(), gum::HashTable< Key, Val, Alloc >::empty(), GUM_SHOWERROR, and gum::HashTable< Key, Val, Alloc >::insert().
|
virtual |
Insert evidence from file.
path | The path to the evidence file. |
Reimplemented in gum::credal::CNLoopyPropagation< GUM_SCALAR >, and gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >.
Definition at line 270 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_evidence, gum::HashTable< Key, Val, Alloc >::clear(), gum::HashTable< Key, Val, Alloc >::empty(), GUM_ERROR, GUM_SHOWERROR, and gum::HashTable< Key, Val, Alloc >::insert().
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::insertEvidenceFile(), and gum::credal::CNLoopyPropagation< GUM_SCALAR >::insertEvidenceFile().
void gum::credal::InferenceEngine< GUM_SCALAR >::insertModals | ( | const std::map< std::string, std::vector< GUM_SCALAR > > & | modals | ) |
Insert variables modalities from map to compute expectations.
modals | The map variable name - modalities. |
Definition at line 193 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_modal, and GUM_SHOWERROR.
void gum::credal::InferenceEngine< GUM_SCALAR >::insertModalsFile | ( | const std::string & | path | ) |
Insert variables modalities from file to compute expectations.
path | The path to the modalities file. |
Definition at line 146 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_modal, and GUM_ERROR.
void gum::credal::InferenceEngine< GUM_SCALAR >::insertQuery | ( | const NodeProperty< std::vector< bool > > & | query | ) |
Insert query variables and states from Property.
query | The on nodes Property containing queried variables states. |
Definition at line 331 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_query, gum::HashTable< Key, Val, Alloc >::clear(), gum::HashTable< Key, Val, Alloc >::empty(), GUM_SHOWERROR, and gum::HashTable< Key, Val, Alloc >::insert().
void gum::credal::InferenceEngine< GUM_SCALAR >::insertQueryFile | ( | const std::string & | path | ) |
Insert query variables states from file.
path | The path to the query file. |
Definition at line 348 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_query, gum::HashTable< Key, Val, Alloc >::clear(), gum::HashTable< Key, Val, Alloc >::empty(), GUM_ERROR, GUM_SHOWERROR, and gum::HashTable< Key, Val, Alloc >::insert().
|
virtualinherited |
Returns true if stopping criterion on epsilon is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 61 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_eps.
Referenced by gum::learning::genericBNLearner::isEnabledEpsilon().
|
virtualinherited |
Returns true if stopping criterion on max iterations is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 112 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_iter.
Referenced by gum::learning::genericBNLearner::isEnabledMaxIter().
|
virtualinherited |
Returns true if stopping criterion on timeout is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 138 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_time.
Referenced by gum::learning::genericBNLearner::isEnabledMaxTime().
|
virtualinherited |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 90 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_min_rate_eps.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::learning::genericBNLearner::isEnabledMinEpsilonRate().
|
pure virtual |
To be redefined by each credal net algorithm.
Starts the inference.
Implemented in gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >, gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >, and gum::credal::CNLoopyPropagation< GUM_SCALAR >.
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::marginalMax | ( | const NodeId | id | ) | const |
Get the upper marginals of a given node id.
id | The node id which upper marginals we want. |
Definition at line 447 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax.
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::marginalMax | ( | const std::string & | varName | ) | const |
Get the upper marginals of a given variable name.
varName | The variable name which upper marginals we want. |
Definition at line 430 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, and gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax.
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::marginalMin | ( | const NodeId | id | ) | const |
Get the lower marginals of a given node id.
id | The node id which lower marginals we want. |
Definition at line 439 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin.
const std::vector< GUM_SCALAR > & gum::credal::InferenceEngine< GUM_SCALAR >::marginalMin | ( | const std::string & | varName | ) | const |
Get the lower marginals of a given variable name.
varName | The variable name which lower marginals we want. |
Definition at line 422 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, and gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin.
|
virtualinherited |
Returns the criterion on number of iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 102 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_max_iter.
Referenced by gum::learning::genericBNLearner::maxIter().
|
virtualinherited |
Returns the timeout (in seconds).
Implements gum::IApproximationSchemeConfiguration.
Definition at line 125 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_max_time.
Referenced by gum::learning::genericBNLearner::maxTime().
|
inherited |
Returns the approximation scheme message.
Definition at line 40 of file IApproximationSchemeConfiguration_inl.h.
References gum::IApproximationSchemeConfiguration::Continue, gum::IApproximationSchemeConfiguration::Epsilon, gum::IApproximationSchemeConfiguration::epsilon(), gum::IApproximationSchemeConfiguration::Limit, gum::IApproximationSchemeConfiguration::maxIter(), gum::IApproximationSchemeConfiguration::maxTime(), gum::IApproximationSchemeConfiguration::minEpsilonRate(), gum::IApproximationSchemeConfiguration::Rate, gum::IApproximationSchemeConfiguration::stateApproximationScheme(), gum::IApproximationSchemeConfiguration::Stopped, gum::IApproximationSchemeConfiguration::TimeLimit, and gum::IApproximationSchemeConfiguration::Undefined.
Referenced by gum::ApproximationScheme::_stopScheme(), gum::ApproximationScheme::continueApproximationScheme(), and gum::credal::InferenceEngine< GUM_SCALAR >::getApproximationSchemeMsg().
|
virtualinherited |
Returns the value of the minimal epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 74 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_min_rate_eps.
Referenced by gum::learning::genericBNLearner::minEpsilonRate().
|
virtualinherited |
Returns the number of iterations.
OperationNotAllowed | Raised if the scheme did not perform. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 163 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_step, GUM_ERROR, gum::ApproximationScheme::stateApproximationScheme(), and gum::IApproximationSchemeConfiguration::Undefined.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::learning::genericBNLearner::nbrIterations().
|
virtualinherited |
Returns the period size.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 149 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_period_size.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference(), and gum::learning::genericBNLearner::periodSize().
|
inherited |
Returns the remaining burn in.
Definition at line 210 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_burn_in, and gum::ApproximationScheme::_current_step.
bool gum::credal::InferenceEngine< GUM_SCALAR >::repetitiveInd | ( | ) | const |
Get the current independence status.
True
if repetitive, False
otherwise. Definition at line 120 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInd.
void gum::credal::InferenceEngine< GUM_SCALAR >::saveExpectations | ( | const std::string & | path | ) | const |
Saves expectations to file.
path | The path to the file to be used. |
Definition at line 554 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMax, gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpMin, and GUM_ERROR.
void gum::credal::InferenceEngine< GUM_SCALAR >::saveMarginals | ( | const std::string & | path | ) | const |
Saves marginals to file.
path | The path to the file to be used. |
Definition at line 528 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin, and GUM_ERROR.
void gum::credal::InferenceEngine< GUM_SCALAR >::saveVertices | ( | const std::string & | path | ) | const |
Saves vertices to file.
path | The path to the file to be used. |
Definition at line 628 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalSets, and GUM_ERROR.
|
virtualinherited |
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. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 43 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_eps, gum::ApproximationScheme::_eps, and GUM_ERROR.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcInitApproximationScheme(), gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::GibbsSampling< GUM_SCALAR >::GibbsSampling(), gum::learning::GreedyHillClimbing::GreedyHillClimbing(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setEpsilon().
|
virtualinherited |
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. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 95 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_iter, gum::ApproximationScheme::_max_iter, and GUM_ERROR.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setMaxIter().
|
virtualinherited |
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. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 118 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_max_time, gum::ApproximationScheme::_max_time, and GUM_ERROR.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setMaxTime().
|
virtualinherited |
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 |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 66 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_enabled_min_rate_eps, gum::ApproximationScheme::_min_rate_eps, and GUM_ERROR.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::GibbsSampling< GUM_SCALAR >::GibbsSampling(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setMinEpsilonRate().
|
virtualinherited |
How many samples between two stopping is enable.
p | The new period value. |
OutOfLowerBound | Raised if p < 1. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 143 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_period_size, and GUM_ERROR.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setPeriodSize().
void gum::credal::InferenceEngine< GUM_SCALAR >::setRepetitiveInd | ( | const bool | repetitive | ) |
repetitive | True if repetitive independence is to be used, false otherwise. Only usefull with dynamic networks. |
Definition at line 111 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInd, and gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInit().
|
virtualinherited |
Set the verbosity on (true) or off (false).
v | If true, then verbosity is turned on. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 152 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_verbosity.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::SamplingInference< GUM_SCALAR >::SamplingInference(), and gum::learning::genericBNLearner::setVerbosity().
|
inherited |
Returns true if we are at the beginning of a period (compute error is mandatory).
Definition at line 197 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_burn_in, gum::ApproximationScheme::_current_step, and gum::ApproximationScheme::_period_size.
Referenced by gum::ApproximationScheme::continueApproximationScheme().
|
virtualinherited |
Returns the approximation scheme state.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 158 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_state.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::history(), gum::ApproximationScheme::nbrIterations(), and gum::learning::genericBNLearner::stateApproximationScheme().
|
inherited |
Stop the approximation scheme.
Definition at line 219 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_state, gum::ApproximationScheme::_stopScheme(), gum::IApproximationSchemeConfiguration::Continue, and gum::IApproximationSchemeConfiguration::Stopped.
Referenced by gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::learning::GreedyHillClimbing::learnStructure(), and gum::learning::LocalSearchWithTabuList::learnStructure().
void gum::credal::InferenceEngine< GUM_SCALAR >::storeBNOpt | ( | const bool | value | ) |
value | True if optimal bayesian networks are to be stored for each variable and each modality. |
Definition at line 99 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_storeBNOpt.
bool gum::credal::InferenceEngine< GUM_SCALAR >::storeBNOpt | ( | ) | const |
True
if optimal bayes net are stored for each variable and each modality, False
otherwise. Definition at line 135 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_storeBNOpt.
void gum::credal::InferenceEngine< GUM_SCALAR >::storeVertices | ( | const bool | value | ) |
value | True if vertices are to be stored, false otherwise. |
Definition at line 104 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginalSets(), and gum::credal::InferenceEngine< GUM_SCALAR >::_storeVertices.
bool gum::credal::InferenceEngine< GUM_SCALAR >::storeVertices | ( | ) | const |
Get the number of iterations without changes used to stop some algorithms.
True
if vertice are stored, False
otherwise. Definition at line 130 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_storeVertices.
std::string gum::credal::InferenceEngine< GUM_SCALAR >::toString | ( | ) | const |
Print all nodes marginals to standart output.
Definition at line 599 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_credalNet, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMax, gum::credal::InferenceEngine< GUM_SCALAR >::_marginalMin, gum::credal::InferenceEngine< GUM_SCALAR >::_query, gum::HashTable< Key, Val, Alloc >::empty(), and gum::HashTable< Key, Val, Alloc >::exists().
|
inherited |
Update the scheme w.r.t the new error and increment steps.
incr | The new increment steps. |
Definition at line 206 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_current_step.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), gum::SamplingInference< GUM_SCALAR >::_loopApproxInference(), gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), and gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference().
|
virtualinherited |
Returns true if verbosity is enabled.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 154 of file approximationScheme_inl.h.
References gum::ApproximationScheme::_verbosity.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::history(), and gum::learning::genericBNLearner::verbosity().
const std::vector< std::vector< GUM_SCALAR > > & gum::credal::InferenceEngine< GUM_SCALAR >::vertices | ( | const NodeId | id | ) | const |
Get the vertice of a given node id.
id | The node id which vertice we want. |
Definition at line 523 of file inferenceEngine_tpl.h.
References gum::credal::InferenceEngine< GUM_SCALAR >::_marginalSets.
|
protectedinherited |
Number of iterations before checking stopping criteria.
Definition at line 414 of file approximationScheme.h.
Referenced by gum::GibbsSampling< GUM_SCALAR >::burnIn(), gum::GibbsBNdistance< GUM_SCALAR >::burnIn(), gum::ApproximationScheme::remainingBurnIn(), gum::GibbsSampling< GUM_SCALAR >::setBurnIn(), gum::GibbsBNdistance< GUM_SCALAR >::setBurnIn(), and gum::ApproximationScheme::startOfPeriod().
|
protected |
A pointer to the Credal Net used.
Definition at line 74 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginalSets(), gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInit(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::credalNet(), gum::credal::InferenceEngine< GUM_SCALAR >::expectationMax(), gum::credal::InferenceEngine< GUM_SCALAR >::expectationMin(), gum::credal::InferenceEngine< GUM_SCALAR >::InferenceEngine(), gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidence(), gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidenceFile(), gum::credal::InferenceEngine< GUM_SCALAR >::insertModals(), gum::credal::InferenceEngine< GUM_SCALAR >::insertQuery(), gum::credal::InferenceEngine< GUM_SCALAR >::insertQueryFile(), gum::credal::InferenceEngine< GUM_SCALAR >::marginalMax(), gum::credal::InferenceEngine< GUM_SCALAR >::marginalMin(), gum::credal::InferenceEngine< GUM_SCALAR >::saveMarginals(), gum::credal::InferenceEngine< GUM_SCALAR >::saveVertices(), and gum::credal::InferenceEngine< GUM_SCALAR >::toString().
|
protectedinherited |
Current epsilon.
Definition at line 369 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), and gum::ApproximationScheme::initApproximationScheme().
|
protectedinherited |
Current rate.
Definition at line 375 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), and gum::ApproximationScheme::initApproximationScheme().
|
protectedinherited |
The current state.
Definition at line 384 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::_stopScheme(), gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::initApproximationScheme(), gum::ApproximationScheme::stateApproximationScheme(), and gum::ApproximationScheme::stopApproximationScheme().
|
protectedinherited |
The current step.
Definition at line 378 of file approximationScheme.h.
Referenced by gum::learning::Miic::_initiation(), gum::learning::Miic::_iteration(), gum::learning::Miic::_orientation_3off2(), gum::learning::Miic::_orientation_latents(), gum::learning::Miic::_orientation_miic(), gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::initApproximationScheme(), gum::learning::Miic::learnMixedStructure(), gum::ApproximationScheme::nbrIterations(), gum::ApproximationScheme::remainingBurnIn(), gum::ApproximationScheme::startOfPeriod(), and gum::ApproximationScheme::updateApproximationScheme().
|
protected |
Object used to efficiently store optimal bayes net during inference, for some algorithms.
Definition at line 147 of file inferenceEngine.h.
Referenced by gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_optFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::getVarMod2BNsMap(), and gum::credal::InferenceEngine< GUM_SCALAR >::InferenceEngine().
|
protected |
Upper dynamic expectations.
If the network if not dynamic it's content is the same as _expectationMax.
Definition at line 101 of file inferenceEngine.h.
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpMax(), gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), and gum::credal::InferenceEngine< GUM_SCALAR >::saveExpectations().
|
protected |
Lower dynamic expectations.
If the network is not dynamic it's content is the same as _expectationMin.
Definition at line 98 of file inferenceEngine.h.
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::dynamicExpMin(), gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), and gum::credal::InferenceEngine< GUM_SCALAR >::saveExpectations().
|
protectedinherited |
If true, the threshold convergence is enabled.
Definition at line 393 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::disableEpsilon(), gum::ApproximationScheme::enableEpsilon(), gum::ApproximationScheme::isEnabledEpsilon(), and gum::ApproximationScheme::setEpsilon().
|
protectedinherited |
If true, the maximum iterations stopping criterion is enabled.
Definition at line 411 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::disableMaxIter(), gum::ApproximationScheme::enableMaxIter(), gum::ApproximationScheme::isEnabledMaxIter(), and gum::ApproximationScheme::setMaxIter().
|
protectedinherited |
If true, the timeout is enabled.
Definition at line 405 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::disableMaxTime(), gum::ApproximationScheme::enableMaxTime(), gum::ApproximationScheme::isEnabledMaxTime(), and gum::ApproximationScheme::setMaxTime().
|
protectedinherited |
If true, the minimal threshold for epsilon rate is enabled.
Definition at line 399 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::disableMinEpsilonRate(), gum::ApproximationScheme::enableMinEpsilonRate(), gum::ApproximationScheme::isEnabledMinEpsilonRate(), and gum::ApproximationScheme::setMinEpsilonRate().
|
protectedinherited |
Threshold for convergence.
Definition at line 390 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::epsilon(), and gum::ApproximationScheme::setEpsilon().
|
protected |
Holds observed variables states.
Definition at line 107 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__insertEvidence(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_optFusion(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateThread(), gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidence(), and gum::credal::InferenceEngine< GUM_SCALAR >::insertEvidenceFile().
|
protected |
Upper expectations, if some variables modalities were inserted.
Definition at line 94 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_expFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateExpectations(), and gum::credal::InferenceEngine< GUM_SCALAR >::expectationMax().
|
protected |
Lower expectations, if some variables modalities were inserted.
Definition at line 91 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_expFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateExpectations(), and gum::credal::InferenceEngine< GUM_SCALAR >::expectationMin().
|
protectedinherited |
The scheme history, used only if verbosity == true.
Definition at line 387 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::history(), and gum::ApproximationScheme::initApproximationScheme().
|
protectedinherited |
Last epsilon value.
Definition at line 372 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme().
|
protected |
Upper marginals.
Definition at line 84 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_initThreadsData(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_optFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateCredalSets(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateMarginals(), gum::credal::InferenceEngine< GUM_SCALAR >::marginalMax(), gum::credal::InferenceEngine< GUM_SCALAR >::saveMarginals(), and gum::credal::InferenceEngine< GUM_SCALAR >::toString().
|
protected |
Lower marginals.
Definition at line 82 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_initThreadsData(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_optFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateCredalSets(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateMarginals(), gum::credal::InferenceEngine< GUM_SCALAR >::marginalMin(), gum::credal::InferenceEngine< GUM_SCALAR >::saveMarginals(), and gum::credal::InferenceEngine< GUM_SCALAR >::toString().
|
protected |
Credal sets vertices, if enabled.
Definition at line 87 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_expFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginalSets(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateCredalSets(), gum::credal::InferenceEngine< GUM_SCALAR >::saveVertices(), and gum::credal::InferenceEngine< GUM_SCALAR >::vertices().
|
protectedinherited |
The maximum iterations.
Definition at line 408 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::maxIter(), and gum::ApproximationScheme::setMaxIter().
|
protectedinherited |
The timeout.
Definition at line 402 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::maxTime(), and gum::ApproximationScheme::setMaxTime().
|
protectedinherited |
Threshold for the epsilon rate.
Definition at line 396 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::minEpsilonRate(), and gum::ApproximationScheme::setMinEpsilonRate().
|
protected |
Variables modalities used to compute expectations.
Definition at line 104 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::InferenceEngine< GUM_SCALAR >::_dynamicExpectations(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_expFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_initExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::_updateExpectations(), gum::credal::InferenceEngine< GUM_SCALAR >::insertModals(), gum::credal::InferenceEngine< GUM_SCALAR >::insertModalsFile(), and gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference().
|
protected |
Old upper marginals used to compute epsilon.
Definition at line 79 of file inferenceEngine.h.
Referenced by gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_initThreadsData(), and gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateOldMarginals().
|
protected |
Old lower marginals used to compute epsilon.
Definition at line 77 of file inferenceEngine.h.
Referenced by gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_computeEpsilon(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginals(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_initThreadsData(), and gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateOldMarginals().
|
protectedinherited |
Checking criteria frequency.
Definition at line 417 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::periodSize(), gum::ApproximationScheme::setPeriodSize(), and gum::ApproximationScheme::startOfPeriod().
|
protected |
Holds the query nodes states.
Definition at line 109 of file inferenceEngine.h.
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::eraseAllEvidence(), gum::credal::InferenceEngine< GUM_SCALAR >::insertQuery(), gum::credal::InferenceEngine< GUM_SCALAR >::insertQueryFile(), and gum::credal::InferenceEngine< GUM_SCALAR >::toString().
|
protected |
True
if using repetitive independence ( dynamic network only ), False
otherwise.
False
by default.
Definition at line 133 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference(), gum::credal::InferenceEngine< GUM_SCALAR >::repetitiveInd(), and gum::credal::InferenceEngine< GUM_SCALAR >::setRepetitiveInd().
|
protected |
Iterations limit stopping rule used by some algorithms such as CNMonteCarloSampling.
The algorithms stops if no changes occured within 1000 iterations by default. int _iterStop; True
is optimal bayes net are stored, for each variable and each modality, False
otherwise. Not all algorithms offers this option. False
by default.
Definition at line 143 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateThread(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::eraseAllEvidence(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference(), and gum::credal::InferenceEngine< GUM_SCALAR >::storeBNOpt().
|
protected |
True
if credal sets vertices are stored, False
otherwise.
False
by default.
Definition at line 129 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_expFusion(), gum::credal::InferenceEngine< GUM_SCALAR >::_initMarginalSets(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_updateThread(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::_verticesFusion(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::CNMonteCarloSampling(), gum::credal::MultipleInferenceEngine< GUM_SCALAR, BNInferenceEngine >::eraseAllEvidence(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::makeInference(), and gum::credal::InferenceEngine< GUM_SCALAR >::storeVertices().
|
protected |
Clusters of nodes used with dynamic networks.
Any node key in _t0 is present at \( t=0 \) and any node belonging to the node set of this key share the same CPT than the key. Used for sampling with repetitive independence.
Definition at line 117 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInit(), and gum::credal::InferenceEngine< GUM_SCALAR >::getT0Cluster().
|
protected |
Clusters of nodes used with dynamic networks.
Any node key in _t1 is present at \( t=1 \) and any node belonging to the node set of this key share the same CPT than the key. Used for sampling with repetitive independence.
Definition at line 124 of file inferenceEngine.h.
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__mcThreadDataCopy(), gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInit(), and gum::credal::InferenceEngine< GUM_SCALAR >::getT1Cluster().
|
protectedinherited |
The timer.
Definition at line 381 of file approximationScheme.h.
Referenced by gum::learning::Miic::_initiation(), gum::learning::Miic::_iteration(), gum::learning::Miic::_orientation_3off2(), gum::learning::Miic::_orientation_latents(), gum::learning::Miic::_orientation_miic(), gum::ApproximationScheme::_stopScheme(), gum::ApproximationScheme::continueApproximationScheme(), gum::ApproximationScheme::currentTime(), gum::ApproximationScheme::initApproximationScheme(), and gum::learning::Miic::learnMixedStructure().
|
protected |
The number of time steps of this network (only usefull for dynamic networks).
Definition at line 154 of file inferenceEngine.h.
Referenced by gum::credal::InferenceEngine< GUM_SCALAR >::_repetitiveInit().
|
protectedinherited |
If true, verbosity is enabled.
Definition at line 420 of file approximationScheme.h.
Referenced by gum::ApproximationScheme::setVerbosity(), and gum::ApproximationScheme::verbosity().
Progression, error and time.
Definition at line 59 of file IApproximationSchemeConfiguration.h.
Referenced by gum::learning::Miic::_initiation(), gum::learning::Miic::_iteration(), gum::learning::Miic::_orientation_3off2(), gum::learning::Miic::_orientation_latents(), gum::learning::Miic::_orientation_miic(), gum::ApproximationScheme::continueApproximationScheme(), and gum::learning::genericBNLearner::distributeProgress().
|
inherited |
Criteria messageApproximationScheme.
Definition at line 62 of file IApproximationSchemeConfiguration.h.
Referenced by gum::ApproximationScheme::_stopScheme(), and gum::learning::genericBNLearner::distributeStop().