You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I just walked through the README file and found something that was not clear. It looks to me from the model that y ~ 2 * h + x_sub_h + noise where h, x_sub_h, noise i.i.d.~ Normal(0, 1). That implies y ~ Normal(0, sqrt(6)) rather than y ~ Normal(0, 2). Similarly, P(y | do(X=1)) ~ Normal(1, sqrt(2)). Do I miss something?
# Define a causal model with single confounder hdefmodel():
h=pyro.sample("h", dist.Normal(0, 1))
x=pyro.sample("x", dist.Normal(h, 1))
y=pyro.sample("y", dist.Normal(x+h, 1))
returny# Define a causal query (here intervening on x)defqueried_model():
returndo(model, {"x": 1})
# Generate 10,000 samples from the observational distribution P(y) ~ N(0, 2)obs_samples=pyro.infer.Predictive(model, num_samples=1000)()["y"]
# Generate 10,000 samples from the interventional distribution P(y | do(X=1)) ~ N(1, 1)int_samples=pyro.infer.Predictive(queried_model(), num_samples=1000)()["y"]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I just walked through the README file and found something that was not clear. It looks to me from the model that
y ~ 2 * h + x_sub_h + noise
whereh, x_sub_h, noise i.i.d.~ Normal(0, 1)
. That impliesy ~ Normal(0, sqrt(6))
rather thany ~ Normal(0, 2)
. Similarly,P(y | do(X=1)) ~ Normal(1, sqrt(2))
. Do I miss something?Beta Was this translation helpful? Give feedback.
All reactions