Click here to hide/show the list of notebooks.
  pyAgrum on notebooks   pyAgrum jupyter
☰  LazyPropagationAdvancedFeatures 
pyAgrum 0.16.2   
Zipped notebooks   
generation: 2019-10-02 10:58  

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.50170.4983
1
0.41420.5858
1
0
0.79110.2089
1
0.72670.2733

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.45890.5411
1
0.26930.7307
1
0
0.47510.5249
1
0.24180.7582
1
0
0
0.14600.8540
1
0.06910.9309
1
0
0.15430.8457
1
0.06040.9396
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.49640.5036
1
0.19150.8085
1
0
0.16580.8342
1
0.04560.9544
1
0
0
0.40600.5940
1
0.32590.6741
1
0
0.12110.8789
1
0.08880.9112
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.44960.2457
1
0.25720.0475
1
0
0.85830.0640
1
0.04230.0354
1
0
0
0.20800.5640
1
0.11900.1090
1
0
0.61590.2276
1
0.03030.1261
In [ ]: