![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
#include <ShaferShenoyLIMIDInference.h>
Public Member Functions | |
DAG | reducedGraph () const |
std::vector< NodeSet > | reversePartialOrder () const |
InfluenceDiagram< GUM_SCALAR > | reducedLIMID () const |
bool | isSolvable () const |
gum::Potential< GUM_SCALAR > | optimalDecision (NodeId decisionId) final |
gum::Potential< GUM_SCALAR > | optimalDecision (const std::string &decisionName) final |
virtual const Potential< GUM_SCALAR > & | posterior (NodeId node) final |
Return the posterior probability of a node. More... | |
const Potential< GUM_SCALAR > & | posterior (const std::string &name) final |
virtual const Potential< GUM_SCALAR > & | posteriorUtility (NodeId node) final |
Return the posterior utility of a node. More... | |
virtual const Potential< GUM_SCALAR > & | posteriorUtility (const std::string &name) final |
virtual std::pair< GUM_SCALAR, GUM_SCALAR > | meanVar (NodeId node) final |
Return the pair (mean,variance) for a node. More... | |
std::pair< GUM_SCALAR, GUM_SCALAR > | meanVar (const std::string &name) final |
std::pair< GUM_SCALAR, GUM_SCALAR > | MEU () final |
Return the pair (mean,variance) for the total utility (MEU) More... | |
virtual void | setInfluenceDiagram (const InfluenceDiagram< GUM_SCALAR > *infdiag) |
assigns a new influence diagram to the inference engine More... | |
virtual const InfluenceDiagram< GUM_SCALAR > & | influenceDiagram () const final |
Returns a constant reference over the IBayesNet referenced by this class. More... | |
Constructor & destructor | |
ShaferShenoyLIMIDInference (const InfluenceDiagram< GUM_SCALAR > *infDiag) | |
Default constructor. More... | |
virtual | ~ShaferShenoyLIMIDInference () |
Destructor. More... | |
const JunctionTree * | junctionTree () const |
Default constructor. More... | |
void | clear () override |
Default constructor. More... | |
void | addNoForgettingAssumption (const std::vector< NodeId > &ids) |
No forgetting rule assumption. More... | |
void | addNoForgettingAssumption (const std::vector< std::string > &names) |
Default constructor. More... | |
bool | hasNoForgettingAssumption () const |
Default constructor. More... | |
Accessors / Modifiers | |
virtual const GraphicalModel & | model () const final |
Returns a constant reference over the IBayesNet referenced by this class. More... | |
virtual const NodeProperty< Size > & | domainSizes () const final |
get the domain sizes of the random variables of the model More... | |
virtual bool | isInferenceReady () const noexcept final |
returns whether the inference object is in a ready state More... | |
virtual bool | isInferenceOutdatedStructure () const noexcept final |
returns whether the inference object is in a OutdatedStructure state More... | |
virtual bool | isInferenceOutdatedPotentials () const noexcept final |
returns whether the inference object is in a OutdatedPotential state More... | |
virtual bool | isInferenceDone () const noexcept final |
returns whether the inference object is in a InferenceDone state More... | |
virtual void | prepareInference () final |
prepare the internal inference structures for the next inference More... | |
virtual void | makeInference () final |
perform the heavy computations needed to compute the targets' posteriors More... | |
virtual StateOfInference | state () const noexcept final |
returns the state of the inference engine More... | |
Evidence | |
virtual void | addEvidence (NodeId id, const Idx val) final |
adds a new hard evidence on node id More... | |
virtual void | addEvidence (const std::string &nodeName, const Idx val) final |
adds a new hard evidence on node named nodeName More... | |
virtual void | addEvidence (NodeId id, const std::string &label) final |
adds a new hard evidence on node id More... | |
virtual void | addEvidence (const std::string &nodeName, const std::string &label) final |
adds a new hard evidence on node named nodeName More... | |
virtual void | addEvidence (NodeId id, const std::vector< GUM_SCALAR > &vals) final |
adds a new evidence on node id (might be soft or hard) More... | |
virtual void | addEvidence (const std::string &nodeName, const std::vector< GUM_SCALAR > &vals) final |
adds a new evidence on node named nodeName (might be soft or hard) More... | |
virtual void | addEvidence (const Potential< GUM_SCALAR > &pot) final |
adds a new evidence on node id (might be soft or hard) More... | |
virtual void | addEvidence (Potential< GUM_SCALAR > &&pot) final |
adds a new evidence on node id (might be soft or hard) More... | |
virtual void | addSetOfEvidence (const Set< const Potential< GUM_SCALAR > * > &potset) final |
adds a new set of evidence More... | |
virtual void | addListOfEvidence (const List< const Potential< GUM_SCALAR > * > &potlist) final |
adds a new list of evidence More... | |
virtual void | chgEvidence (NodeId id, const Idx val) final |
change the value of an already existing hard evidence More... | |
virtual void | chgEvidence (const std::string &nodeName, const Idx val) final |
change the value of an already existing hard evidence More... | |
virtual void | chgEvidence (NodeId id, const std::string &label) final |
change the value of an already existing hard evidence More... | |
virtual void | chgEvidence (const std::string &nodeName, const std::string &label) final |
change the value of an already existing hard evidence More... | |
virtual void | chgEvidence (NodeId id, const std::vector< GUM_SCALAR > &vals) final |
change the value of an already existing evidence (might be soft or hard) More... | |
virtual void | chgEvidence (const std::string &nodeName, const std::vector< GUM_SCALAR > &vals) final |
change the value of an already existing evidence (might be soft or hard) More... | |
virtual void | chgEvidence (const Potential< GUM_SCALAR > &pot) final |
change the value of an already existing evidence (might be soft or hard) More... | |
virtual void | eraseAllEvidence () final |
removes all the evidence entered into the network More... | |
virtual void | eraseEvidence (NodeId id) final |
removed the evidence, if any, corresponding to node id More... | |
virtual void | eraseEvidence (const std::string &nodeName) final |
removed the evidence, if any, corresponding to node of name nodeName More... | |
virtual bool | hasEvidence () const final |
indicates whether some node(s) have received evidence More... | |
virtual bool | hasEvidence (NodeId id) const final |
indicates whether node id has received an evidence More... | |
virtual bool | hasEvidence (const std::string &nodeName) const final |
indicates whether node id has received an evidence More... | |
virtual bool | hasHardEvidence (NodeId id) const final |
indicates whether node id has received a hard evidence More... | |
virtual bool | hasHardEvidence (const std::string &nodeName) const final |
indicates whether node id has received a hard evidence More... | |
virtual bool | hasSoftEvidence (NodeId id) const final |
indicates whether node id has received a soft evidence More... | |
virtual bool | hasSoftEvidence (const std::string &nodeName) const final |
indicates whether node id has received a soft evidence More... | |
virtual Size | nbrEvidence () const final |
returns the number of evidence entered into the Bayesian network More... | |
virtual Size | nbrHardEvidence () const final |
returns the number of hard evidence entered into the Bayesian network More... | |
virtual Size | nbrSoftEvidence () const final |
returns the number of soft evidence entered into the Bayesian network More... | |
const NodeProperty< const Potential< GUM_SCALAR > *> & | evidence () const |
returns the set of evidence More... | |
const NodeSet & | softEvidenceNodes () const |
returns the set of nodes with soft evidence More... | |
const NodeSet & | hardEvidenceNodes () const |
returns the set of nodes with hard evidence More... | |
const NodeProperty< Idx > & | hardEvidence () const |
indicate for each node with hard evidence which value it took More... | |
Public Types | |
enum | StateOfInference { StateOfInference::OutdatedStructure, StateOfInference::OutdatedPotentials, StateOfInference::ReadyForInference, StateOfInference::Done } |
current state of the inference More... | |
Protected Attributes | |
DAG | reduced_ |
CliqueGraph | reducedJunctionTree_ |
NodeProperty< NodeId > | node_to_clique_ |
EdgeProperty< SetOfVars > | varsSeparator_ |
NodeProperty< Potential< GUM_SCALAR > > | strategies_ |
NodeProperty< DecisionPotential< GUM_SCALAR > > | posteriors_ |
NodeProperty< DecisionPotential< GUM_SCALAR > > | unconditionalDecisions_ |
std::vector< NodeSet > | reversePartialOrder_ |
std::vector< NodeId > | solvabilityOrder_ |
std::vector< NodeId > | noForgettingOrder_ |
Protected Member Functions | |
void | onStateChanged_ () override |
fired when the stage is changed More... | |
void | onEvidenceAdded_ (NodeId id, bool isHardEvidence) override |
fired after a new evidence is inserted More... | |
void | onEvidenceErased_ (NodeId id, bool isHardEvidence) override |
fired before an evidence is removed More... | |
void | onAllEvidenceErased_ (bool contains_hard_evidence) override |
fired before all the evidence are erased More... | |
void | onEvidenceChanged_ (NodeId id, bool hasChangedSoftHard) override |
fired after an evidence is changed, in particular when its status (soft/hard) changes More... | |
void | onModelChanged_ (const GraphicalModel *model) override |
fired after a new Bayes net has been assigned to the engine More... | |
void | updateOutdatedStructure_ () override |
prepares inference when the latter is in OutdatedStructure state More... | |
void | updateOutdatedPotentials_ () override |
prepares inference when the latter is in OutdatedPotentials state More... | |
void | makeInference_ () override |
called when the inference has to be performed effectively More... | |
NodeSet | nonRequisiteNodes_ (NodeId d) const |
Returns the set of non-requisite for node d. More... | |
void | createReduced_ () |
void | setOutdatedStructureState_ () |
put the inference into an outdated model structure state More... | |
void | setOutdatedPotentialsState_ () |
puts the inference into an OutdatedPotentials state if it is not already in an OutdatedStructure state More... | |
virtual void | setState_ (const StateOfInference state) final |
set the state of the inference engine and call the notification onStateChanged_ when necessary (i.e. when the state has effectively changed). More... | |
void | setModel_ (const GraphicalModel *model) |
void | setModelDuringConstruction_ (const GraphicalModel *model) |
assigns a model during the inference engine construction More... | |
bool | hasNoModel_ () const |
Definition at line 65 of file ShaferShenoyLIMIDInference.h.
|
private |
Definition at line 66 of file ShaferShenoyLIMIDInference.h.
|
private |
Definition at line 67 of file ShaferShenoyLIMIDInference.h.
|
private |
Definition at line 68 of file ShaferShenoyLIMIDInference.h.
|
stronginherited |
current state of the inference
graphicalModelInference can be in one of 4 different states:
Enumerator | |
---|---|
OutdatedStructure | |
OutdatedPotentials | |
ReadyForInference | |
Done |
Definition at line 106 of file graphicalModelInference.h.
|
explicit |
Default constructor.
infDiag | the influence diagram we want to perform inference upon |
|
virtual |
Destructor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
finalvirtualinherited |
adds a new hard evidence on node id
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id already has an evidence |
Definition at line 228 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new hard evidence on node named nodeName
UndefinedElement | if nodeName does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if nodeName already has an evidence |
Definition at line 234 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new hard evidence on node id
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id already has an evidence |
Definition at line 241 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new hard evidence on node named nodeName
UndefinedElement | if nodeName does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if nodeName already has an evidence |
Definition at line 248 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new evidence on node id (might be soft or hard)
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if id already has an evidence |
FatalError | if vals=[0,0,...,0] |
InvalidArgument | if the size of vals is different from the domain size of node id |
Definition at line 256 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new evidence on node named nodeName (might be soft or hard)
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if nodeName already has an evidence |
FatalError | if vals=[0,0,...,0] |
InvalidArgument | if the size of vals is different from the domain size of node nodeName |
Definition at line 280 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new evidence on node id (might be soft or hard)
UndefinedElement | if the potential is defined over several nodes |
UndefinedElement | if the node on which the potential is defined does not belong to the Bayesian network |
InvalidArgument | if the node of the potential already has an evidence |
FatalError | if pot=[0,0,...,0] |
Definition at line 325 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new evidence on node id (might be soft or hard)
UndefinedElement | if the potential is defined over several nodes |
UndefinedElement | if the node on which the potential is defined does not belong to the Bayesian network |
InvalidArgument | if the node of the potential already has an evidence |
FatalError | if pot=[0,0,...,0] |
Definition at line 287 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
adds a new list of evidence
UndefinedElement | if some potential is defined over several nodes |
UndefinedElement | if the node on which some potential is defined does not belong to the Bayesian network |
InvalidArgument | if the node of some potential already has an evidence |
FatalError | if pot=[0,0,...,0] |
Definition at line 333 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
void gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::addNoForgettingAssumption | ( | const std::vector< NodeId > & | ids | ) |
No forgetting rule assumption.
void gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::addNoForgettingAssumption | ( | const std::vector< std::string > & | names | ) |
Default constructor.
infDiag | the influence diagram we want to perform inference upon |
|
finalvirtualinherited |
adds a new set of evidence
UndefinedElement | if some potential is defined over several nodes |
UndefinedElement | if the node on which some potential is defined does not belong to the Bayesian network |
InvalidArgument | if the node of some potential already has an evidence |
FatalError | if pot=[0,0,...,0] |
Definition at line 342 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
|
finalvirtualinherited |
change the value of an already existing hard evidence
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id does not already have an evidence |
Definition at line 402 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing hard evidence
UndefinedElement | if nodeName does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id does not already have an evidence |
Definition at line 408 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing hard evidence
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id does not already have an evidence |
Definition at line 415 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing hard evidence
UndefinedElement | if nodeName does not belong to the Bayesian network |
InvalidArgument | if val is not a value for id |
InvalidArgument | if id does not already have an evidence |
Definition at line 422 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing evidence (might be soft or hard)
UndefinedElement | if id does not belong to the Bayesian network |
InvalidArgument | if the node does not already have an evidence |
FatalError | if vals=[0,0,...,0] |
InvalidArgument | if the size of vals is different from the domain size of node id |
Definition at line 431 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing evidence (might be soft or hard)
UndefinedElement | if nodeName does not belong to the Bayesian network |
InvalidArgument | if the node does not already have an evidence |
FatalError | if vals=[0,0,...,0] |
InvalidArgument | if the size of vals is different from the domain size of node id |
Definition at line 456 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
change the value of an already existing evidence (might be soft or hard)
UndefinedElement | if the potential is defined over several nodes |
UndefinedElement | if the node on which the potential is defined does not belong to the Bayesian network |
InvalidArgument | if the node of the potential does not already have an evidence |
FatalError | if pot=[0,0,...,0] |
Definition at line 464 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
overridevirtual |
Default constructor.
infDiag | the influence diagram we want to perform inference upon |
Reimplemented from gum::GraphicalModelInference< GUM_SCALAR >.
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
finalvirtualinherited |
get the domain sizes of the random variables of the model
Definition at line 159 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
removes all the evidence entered into the network
Definition at line 553 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
removed the evidence, if any, corresponding to node id
Definition at line 527 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
removed the evidence, if any, corresponding to node of name nodeName
Definition at line 546 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
returns the set of evidence
Definition at line 605 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
indicate for each node with hard evidence which value it took
Definition at line 597 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
returns the set of nodes with hard evidence
the set of nodes that received hard evidence
Definition at line 619 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether some node(s) have received evidence
Definition at line 351 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received an evidence
Definition at line 358 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received an evidence
Definition at line 380 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a hard evidence
Definition at line 365 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a hard evidence
Definition at line 388 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
bool gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::hasNoForgettingAssumption | ( | ) | const |
Default constructor.
infDiag | the influence diagram we want to perform inference upon |
|
inlineprotectedinherited |
Definition at line 527 of file graphicalModelInference.h.
|
finalvirtualinherited |
indicates whether node id has received a soft evidence
Definition at line 372 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a soft evidence
Definition at line 396 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
Returns a constant reference over the IBayesNet referenced by this class.
UndefinedElement | is raised if no Bayes net has been assigned to the inference. |
|
private |
|
private |
|
private |
|
finalvirtualnoexceptinherited |
returns whether the inference object is in a InferenceDone state
The inference object is in a done state when the posteriors can be retrieved without performing a new inference, i.e., all the heavy computations have already been performed. Typically, in a junction tree algorithm, this corresponds to a situation in which all the messages needed in the JT have been computed and sent.
Definition at line 84 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualnoexceptinherited |
returns whether the inference object is in a OutdatedPotential state
Definition at line 79 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualnoexceptinherited |
returns whether the inference object is in a OutdatedStructure state
Definition at line 73 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualnoexceptinherited |
returns whether the inference object is in a ready state
Definition at line 68 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
bool gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::isSolvable | ( | ) | const |
const JunctionTree* gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::junctionTree | ( | ) | const |
Default constructor.
infDiag | the influence diagram we want to perform inference upon |
|
finalvirtualinherited |
perform the heavy computations needed to compute the targets' posteriors
In a Junction tree propagation scheme, for instance, the heavy computations are those of the messages sent in the JT. This is precisely what makeInference should compute. Later, the computations of the posteriors can be done "lightly" by multiplying and projecting those messages.
Definition at line 664 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
overrideprotectedvirtual |
called when the inference has to be performed effectively
Once the inference is done, fillPosterior_ can be called.
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
finalvirtual |
Return the pair (mean,variance) for a node.
node |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
|
inlinefinalvirtual |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
Definition at line 142 of file ShaferShenoyLIMIDInference.h.
|
finalvirtual |
Return the pair (mean,variance) for the total utility (MEU)
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
|
finalvirtualinherited |
Returns a constant reference over the IBayesNet referenced by this class.
UndefinedElement | is raised if no Bayes net has been assigned to the inference. |
Definition at line 107 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
returns the number of evidence entered into the Bayesian network
Definition at line 576 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
returns the number of hard evidence entered into the Bayesian network
Definition at line 583 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
returns the number of soft evidence entered into the Bayesian network
Definition at line 590 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
Returns the set of non-requisite for node d.
|
overrideprotectedvirtual |
fired before all the evidence are erased
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
fired after a new evidence is inserted
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
fired after an evidence is changed, in particular when its status (soft/hard) changes
nodeId | the node of the changed evidence |
hasChangedSoftHard | true if the evidence has changed from Soft to Hard or from Hard to Soft |
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
fired before an evidence is removed
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
fired after a new Bayes net has been assigned to the engine
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
fired when the stage is changed
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
finalvirtual |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
|
inlinefinalvirtual |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
Definition at line 109 of file ShaferShenoyLIMIDInference.h.
|
finalvirtual |
Return the posterior probability of a node.
node |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
|
inlinefinalvirtual |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
Definition at line 120 of file ShaferShenoyLIMIDInference.h.
|
finalvirtual |
Return the posterior utility of a node.
node |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
|
inlinefinalvirtual |
Implements gum::InfluenceDiagramInference< GUM_SCALAR >.
Definition at line 131 of file ShaferShenoyLIMIDInference.h.
|
finalvirtualinherited |
prepare the internal inference structures for the next inference
Definition at line 645 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Definition at line 99 of file ShaferShenoyLIMIDInference.h.
InfluenceDiagram< GUM_SCALAR > gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::reducedLIMID | ( | ) | const |
std::vector< NodeSet > gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::reversePartialOrder | ( | ) | const |
|
virtualinherited |
assigns a new influence diagram to the inference engine
Assigns a new influence diagram to the o,fere,ce e,go,e engine and sends messages to the descendants of ShaferShenoyLIMIDInference to inform them that the ID has changed.
|
protectedinherited |
Definition at line 118 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
assigns a model during the inference engine construction
Definition at line 129 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
puts the inference into an OutdatedPotentials state if it is not already in an OutdatedStructure state
OutdatedPotentials: in this state, the structure of the model remains unchanged, only some potentials stored in it have changed. Therefore, the inference probably just needs to invalidate some already computed potentials to be ready. Only a light amount of preparation is needed to be able to perform inference.
Definition at line 638 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
put the inference into an outdated model structure state
OutdatedStructure: in this state, the inference is fully unprepared to be applied because some events changed the "logical" structure of the model: for instance a node received a hard evidence, which implies that its outgoing arcs can be removed from the model, hence involving a structural change in the model. As a consequence, the (incremental) inference (probably) needs a significant amount of preparation to be ready for the next inference. In a Lazy propagation, for instance, this step amounts to compute a new join tree, hence a new structure in which inference will be applied. Note that classes that inherit from graphicalModelInference may be smarter than graphicalModelInference and may, in some situations, find out that their data structures are still ok for inference and, therefore, only resort to perform the actions related to the OutdatedPotentials state. As an example, consider a LazyPropagation inference in Bayes Net A->B->C->D->E in which C has received hard evidence e_C and E is the only target. In this case, A and B are not needed for inference, the only potentials that matter are P(D|e_C) and P(E|D). So the smallest join tree needed for inference contains only one clique DE. Now, adding new evidence e_A on A has no impact on E given hard evidence e_C. In this case, LazyPropagation can be smart and not update its join tree.
Definition at line 630 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalprotectedvirtualinherited |
set the state of the inference engine and call the notification onStateChanged_ when necessary (i.e. when the state has effectively changed).
Definition at line 98 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
returns the set of nodes with soft evidence
the set of nodes that received soft evidence
Definition at line 612 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualnoexceptinherited |
returns the state of the inference engine
Definition at line 92 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
|
private |
|
overrideprotectedvirtual |
prepares inference when the latter is in OutdatedPotentials state
Note that the values of evidence are not necessarily known and can be changed between updateOutdatedPotentials_ and makeInference_.
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
overrideprotectedvirtual |
prepares inference when the latter is in OutdatedStructure state
Note that the values of evidence are not necessarily known and can be changed between updateOutdatedStructure_ and makeInference_.
Implements gum::GraphicalModelInference< GUM_SCALAR >.
|
protected |
Definition at line 169 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 178 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 172 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 167 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 168 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 176 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 177 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 171 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 173 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 170 of file ShaferShenoyLIMIDInference.h.