![]() |
aGrUM
0.20.2
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 67 of file ShaferShenoyLIMIDInference.h.
|
private |
Definition at line 68 of file ShaferShenoyLIMIDInference.h.
|
private |
Definition at line 69 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.
|
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 243 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 250 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 259 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 266 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 275 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 302 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 352 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 310 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 361 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 370 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
|
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 432 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 439 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 448 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 455 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 464 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 492 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 501 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 |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
finalvirtualinherited |
get the domain sizes of the random variables of the model
Definition at line 168 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
removes all the evidence entered into the network
Definition at line 597 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
removed the evidence, if any, corresponding to node id
Definition at line 568 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 589 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
returns the set of evidence
Definition at line 652 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
|
inherited |
indicate for each node with hard evidence which value it took
Definition at line 644 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 668 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether some node(s) have received evidence
Definition at line 379 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received an evidence
Definition at line 386 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received an evidence
Definition at line 409 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a hard evidence
Definition at line 394 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a hard evidence
Definition at line 417 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 533 of file graphicalModelInference.h.
|
finalvirtualinherited |
indicates whether node id has received a soft evidence
Definition at line 402 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualinherited |
indicates whether node id has received a soft evidence
Definition at line 425 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 89 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 82 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 75 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 70 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 714 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 146 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 114 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 622 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 629 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 636 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 112 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 123 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 135 of file ShaferShenoyLIMIDInference.h.
|
finalvirtualinherited |
prepare the internal inference structures for the next inference
Definition at line 695 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Definition at line 101 of file ShaferShenoyLIMIDInference.h.
InfluenceDiagram< GUM_SCALAR > gum::ShaferShenoyLIMIDInference< GUM_SCALAR >::reducedLIMID | ( | ) | const |
|
private |
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 125 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
assigns a model during the inference engine construction
Definition at line 137 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 688 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 679 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 103 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 660 of file graphicalModelInference_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtualnoexceptinherited |
returns the state of the inference engine
Definition at line 97 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 173 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 182 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 176 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 171 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 172 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 180 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 181 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 175 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 177 of file ShaferShenoyLIMIDInference.h.
|
protected |
Definition at line 174 of file ShaferShenoyLIMIDInference.h.