zenna / OmegaCore.jl

1 stars 2 forks source link

Equality of Random Variables #8

Closed zenna closed 4 years ago

zenna commented 4 years ago

In Omega the equality of Random Variables was straightforward, we could just check their ids.

In OmegaCore it's now more complicated. Consider:

x = 1 ~ Normal(0, 1)
f(w) = x(w)
f2 = 2 ~ x

Now consider an intervention

 fg = f |ᵈ (x => (w->10))
randsample(fg) # 10

This is wrong. It happens because x is matching the x within fg but they are not the same x! Equality of Random variables is much more complicated.

zenna commented 4 years ago

This is mitigated somewhat with the simpler semantics of ~