charles-river-analytics / figaro

Figaro Programming Language and Core Libraries
Other
756 stars 151 forks source link

Intervention does not appear to work for Structured algorithms #728

Open AliOC opened 6 years ago

AliOC commented 6 years ago

P(X = xi | do(Y = yi)) and P(X = xi) are not different for StructuredVE. An example of this is for the model if we intervene on the ancestors of each variable. val universe = Universe.createNew() val a = Flip(0.1)("a", universe) val b = If(a, Flip(0.2), Flip(0.3))("b", universe) val c = If(b, Flip(0.4), Flip(0.5))("c", universe) val d = If(c, Flip(0.6), Flip(0.7))("d", universe)

P(X = xi | do(Y = yi)) and P(X = xi) are different for VariableElimination, MH, and Importance Sampling. This suggests that intervention does not work correctly for SFI algorithms.