30 #ifndef GUM_MARKOV_NET_JOINT_TARGETED_INFERENCE_H 31 #define GUM_MARKOV_NET_JOINT_TARGETED_INFERENCE_H 34 #include <agrum/MN/inference/tools/marginalTargetedMNInference.h> 35 #include <agrum/agrum.h> 55 template <
typename GUM_SCALAR >
213 GUM_SCALAR
I(NodeId X, NodeId Y);
222 GUM_SCALAR
I(
const std::string& X,
const std::string& Y);
231 GUM_SCALAR
VI(NodeId X, NodeId Y);
239 GUM_SCALAR
VI(
const std::string& X,
const std::string& Y);
315 #include <agrum/MN/inference/tools/jointTargetedMNInference_tpl.h> 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...
GUM_SCALAR VI(const std::string &X, const std::string &Y)
Variation of information between X and Y.
virtual const Potential< GUM_SCALAR > & jointPosterior_(const NodeSet &set)=0
asks derived classes for the joint posterior of a declared target set
virtual void onModelChanged_(const GraphicalModel *mn)
fired after a new Markov net has been assigned to the engine
virtual const Set< NodeSet > & jointTargets() const noexcept final
returns the list of joint targets
virtual void eraseJointTarget(const NodeSet &joint_target) final
removes an existing joint target
virtual void eraseAllJointTargets() final
Clear all previously defined joint targets.
INLINE void emplace(Args &&... args)
virtual NodeSet superForJointComputable_(const NodeSet &vars)
virtual Size nbrJointTargets() const noexcept final
returns the number of joint targets
virtual void onAllTargetsErased_()=0
fired before a all the marginal and joint targets are removed
GUM_SCALAR I(NodeId X, NodeId Y)
Mutual information between X and Y.
virtual const Potential< GUM_SCALAR > & jointPosterior(const NodeSet &nodes) final
Compute the joint posterior of a set of nodes.
virtual const Potential< GUM_SCALAR > & posterior(const std::string &nodeName) final
Computes and returns the posterior of a node.
virtual void eraseAllMarginalTargets() final
Clear all the previously defined marginal targets.
Set< NodeSet > _joint_targets_
the set of joint targets
virtual void onAllJointTargetsErased_()=0
fired before a all the joint targets are removed
virtual bool isJointTarget(const NodeSet &vars) const final
return true if target is a joint target.
GUM_SCALAR VI(NodeId X, NodeId Y)
Variation of information between X and Y.
virtual ~JointTargetedMNInference()
destructor
GUM_SCALAR jointMutualInformation(const std::vector< std::string > &targets)
Mutual information between targets.
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 ...
<agrum/MN/inference/jointTargetedMNInference.h>
GUM_SCALAR I(const std::string &X, const std::string &Y)
Mutual information between X and Y.
virtual Potential< GUM_SCALAR > * unnormalizedJointPosterior_(NodeId id)=0
returns a fresh potential equal to P(argument,evidence)
JointTargetedMNInference(const IMarkovNet< GUM_SCALAR > *mn)
default constructor
virtual bool isExactJointComputable_(const NodeSet &vars)
check if the vars form a possible computable joint (can be redefined by subclass) ...
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 onJointTargetAdded_(const NodeSet &set)=0
fired after a new joint target is inserted
virtual Potential< GUM_SCALAR > * unnormalizedJointPosterior_(const NodeSet &set)=0
returns a fresh unnormalized joint posterior of a given set of variables
virtual void onJointTargetErased_(const NodeSet &set)=0
fired before a joint target is removed
virtual const Potential< GUM_SCALAR > & posterior(NodeId node) final
Computes and returns the posterior of a node.
virtual void eraseAllTargets()
Clear all previously defined targets (marginal and joint targets)