30 #ifndef GUM_BAYES_NET_JOINT_TARGETED_INFERENCE_H 31 #define GUM_BAYES_NET_JOINT_TARGETED_INFERENCE_H 34 #include <agrum/BN/inference/tools/marginalTargetedInference.h> 35 #include <agrum/agrum.h> 55 template <
typename GUM_SCALAR >
56 class JointTargetedInference:
public MarginalTargetedInference< GUM_SCALAR > {
213 GUM_SCALAR
I(NodeId X, NodeId Y);
221 GUM_SCALAR
I(
const std::string& Xname,
const std::string& Yname);
230 GUM_SCALAR
VI(NodeId X, NodeId Y);
239 GUM_SCALAR
VI(
const std::string& Xname,
const std::string& Yname);
310 #include <agrum/BN/inference/tools/jointTargetedInference_tpl.h> virtual void eraseAllMarginalTargets() final
Clear all the previously defined marginal targets.
virtual void eraseAllTargets()
Clear all previously defined targets (marginal and joint targets)
virtual Potential< GUM_SCALAR > * unnormalizedJointPosterior_(const NodeSet &set)=0
returns a fresh unnormalized joint posterior of a given set of variables
virtual void addJointTarget(const NodeSet &joint_target) final
Add a set of nodes as a new joint target. As a collateral effect, every node is added as a marginal t...
virtual ~JointTargetedInference()
destructor
JointTargetedInference(const IBayesNet< GUM_SCALAR > *bn)
default constructor
GUM_SCALAR I(NodeId X, NodeId Y)
Mutual information between X and Y.
virtual void onJointTargetAdded_(const NodeSet &set)=0
fired after a new joint target is inserted
GUM_SCALAR VI(const std::string &Xname, const std::string &Yname)
Variation of information between X and Y.
Set< NodeSet > _joint_targets_
the set of joint targets
virtual const Potential< GUM_SCALAR > & posterior(const std::string &nodeName) final
Computes and returns the posterior of a node.
virtual bool isJointTarget(const NodeSet &vars) const final
return true if target is a joint target.
INLINE void emplace(Args &&... args)
virtual const Potential< GUM_SCALAR > & jointPosterior_(const NodeSet &set)=0
asks derived classes for the joint posterior of a declared target set
virtual void eraseJointTarget(const NodeSet &joint_target) final
removes an existing joint target
virtual void onAllTargetsErased_()=0
fired before a all the marginal and joint targets are removed
virtual void onAllJointTargetsErased_()=0
fired before a all the joint targets are removed
GUM_SCALAR jointMutualInformation(const std::vector< std::string > &targets)
Mutual information between targets.
Potential< GUM_SCALAR > evidenceJointImpact(const std::vector< std::string > &targets, const std::vector< std::string > &evs)
Create a gum::Potential for P(joint targets|evs) (for all instanciation of targets and evs) ...
virtual void eraseAllJointTargets() final
Clear all previously defined joint targets.
virtual const Set< NodeSet > & jointTargets() const noexcept final
returns the list of joint targets
virtual const Potential< GUM_SCALAR > & jointPosterior(const NodeSet &nodes) final
Compute the joint posterior of a set of nodes.
GUM_SCALAR I(const std::string &Xname, const std::string &Yname)
Mutual information between X and Y.
virtual void onModelChanged_(const GraphicalModel *bn)
fired after a new Bayes net has been assigned to the engine
virtual Potential< GUM_SCALAR > * unnormalizedJointPosterior_(NodeId id)=0
returns a fresh potential equal to P(argument,evidence)
virtual const Potential< GUM_SCALAR > & posterior(NodeId node) final
Computes and returns the posterior of a node.
virtual Size nbrJointTargets() const noexcept final
returns the number of joint targets
virtual void onJointTargetErased_(const NodeSet &set)=0
fired before a joint target is removed
GUM_SCALAR VI(NodeId X, NodeId Y)
Variation of information between X and Y.
virtual const Potential< GUM_SCALAR > & jointPosterior_(const NodeSet &wanted_target, const NodeSet &declared_target)=0
asks derived classes for the joint posterior of a set of variables not declared as a joint target ...