Inference for Influence Diagram
- class pyagrum.ShaferShenoyLIMIDInference(infDiag)
This inference solves the model as a LIMID (limited memory influence diagram), where a decision only knows its parents. When a directed path goes through all the decisions (a classical influence diagram), the no-forgetting assumption is made: each decision also knows what the previous decisions knew. Another order of the decisions can be given by
pyagrum.ShaferShenoyLIMIDInference.addNoForgettingAssumption.- Parameters:
infDiag (
InfluenceDiagram)
Scientific notes
ShaferShenoyLIMIDInference solves an influence diagram as a LIMID (limited memory influence diagram)
[1], where a decision only knows its parents, with one exception: when a directed path
goes through all the decisions (a classical influence diagram), the no-forgetting assumption is made, each decision
receiving the family of the previous one as parents. addNoForgettingAssumption gives this order explicitly (it is
then applied even when the decisions are not ordered by the graph; the order must list all the decisions).
Reduction and solvability. A parent \(n\) of a decision \(d\) is non-requisite, and its arc is removed, when every utility node \(u\) descending from \(d\) is d-separated from \(n\) by \(\mathrm{fa}(d) \setminus \{n\}\). A decision \(d\) is extremal when every such \(u\) is d-separated from the families of the other decisions by \(\mathrm{fa}(d)\); the LIMID is soluble if the decisions can be ordered so that each one is extremal once the following ones are turned into chance nodes [2]. With the no-forgetting assumption, the diagram is always soluble. Otherwise, pyAgrum removes an extremal decision (looked for by levels from the utilities upwards, the extremality being checked against all the decisions not removed yet) until none remains; a LIMID found non soluble is refused.
Single policy updating. In this order, each decision gets an optimal policy, computed under the uniform policy for the decisions not yet solved, and becomes a chance node with this policy; for a soluble LIMID one pass gives an optimal strategy [1]. The policy maximizes, for each configuration of the parents, the expected utility among the values of non-zero probability (ties broken by the higher probability, then by the first value): the policies are deterministic.
Propagation. The messages follow the Shafer-Shenoy scheme (pyagrum.ShaferShenoyInference), in a junction tree
of the moral graph of
the reduced LIMID without its utility nodes (default triangulation), with factors that are pairs
\((p, u)\) of a probability and a utility [2]:
MEU returns the mean and the variance of the total utility under the optimal strategy, computed by propagating
the first two moments of the utility.
Methods
Returns maximum expected utility obtained from inference. |
|
Adds a new evidence on a node (might be soft or hard). |
|
Add a no-forgetting assumption for a list of decision variables. |
|
Change the value of an already existing evidence on a node (might be soft or hard). |
|
Clear all evidence and reset the inference engine to its initial state. |
|
Remove all evidence. |
|
Remove the evidence, if any, corresponding to the node Id or name. |
|
Indicates whether a node has received evidence or, without argument, whether at least one node has. |
|
Check whether a no-forgetting order has been given by |
|
Returns a constant reference over the InfluenceDiagram on which this class work. |
|
Tells the inference that the values of tensors of its model changed in place. |
|
Check whether the influence diagram is soluble: then the strategy found is optimal. |
|
Perform the heavy computations needed to compute the optimal decisions. |
|
Returns best choice for decision variable given in parameter ( based upon MEU criteria ) |
|
Returns the posterior of a chance or a decision node (after optimisation). |
|
Returns the posterior utiliyt of a utility node (after optimisation) depending on decision nodes, if any. |
|
Returns the DAG build to solve the influence diagram. |
|
Returns the (reduced) LIMID build to solve the influence diagram. |
|
Return the reversed partial order of decision nodes used internally. |
|
Erase all the evidences and apply addEvidence(key,value) for every pairs in evidces. |
|
Return the set of nodes with soft (likelihood) evidence. |
|
Apply chgEvidence(key,value) for every pairs in evidces (or addEvidence). |