Click here to hide/show the list of notebooks.
  pyAgrum on notebooks   pyAgrum jupyter
☰  LazyPropagationAdvancedFeatures 
pyAgrum 0.18.0   
Zipped notebooks   
generation: 2020-06-11 14:09  

Creative Commons License
This pyAgrum's notebook is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

In [1]:
import pyAgrum as gum
import pyAgrum.lib.notebook as gnb
In [2]:
bn=gum.fastBN("A->B->C->D;A->E->D;F->B;C->H")
ie=gum.LazyPropagation(bn)
bn              
Out[2]:
G A A B B A->B E E A->E C C B->C D D C->D H H C->H E->D F F F->B

Evidence Impact allows the user to analyze the effect of any variables on any other variables

In [3]:
ie.evidenceImpact("B",["A","H"])
Out[3]:
B
A
H
0
1
0
0
0.30410.6959
1
0.70500.2950
1
0
0.44300.5570
1
0.81310.1869

Evidence impact is able to find the minimum set of variables which effectively conditions the analyzed variable

In [4]:
ie.evidenceImpact("E",["A","F","B","D"]) # {A,D,B} d-separates E and F
Out[4]:
E
A
B
D
0
1
0
0
0
0.26160.7384
1
0.12000.8800
1
0
0.28280.7172
1
0.05760.9424
1
0
0
0.49040.5096
1
0.27030.7297
1
0
0.51710.4829
1
0.14240.8576
In [5]:
ie.evidenceImpact("E",["A","B","C","D","F"]) # {A,C,D} d-separates E and {B,F}
Out[5]:
E
C
A
D
0
1
0
0
0
0.28610.7139
1
0.04010.9599
1
0
0.52120.4788
1
0.10180.8982
1
0
0
0.21430.7857
1
0.16680.8332
1
0
0.42550.5745
1
0.35220.6478
In [6]:
ie.evidenceJointImpact(["A","F"],["B","C","D","E","H"]) # {B,E} d-separates [A,F] and [C,D,H]
Out[6]:
A
E
B
F
0
1
0
0
0
0.04850.3572
1
0.08220.5121
1
0
0.08450.2819
1
0.13040.5032
1
0
0
0.10760.2917
1
0.18240.4183
1
0
0.16770.2059
1
0.25880.3676
In [ ]: