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
In many (perhaps most) cases the number of random variables is static.
This leads to a number of optimizations
We can do all the keying statically, without the use of dictionaries
We can preallocate the size of \omega as a flat array
We can make a greater number of assumptions about memoization, especially when used in conjunction with interventions
from an API perspective, I can imagine a function static(x) which is an assertion by the user that x is static and/or as a flag passed into inference algorithms.
Since the program is static, we could compile a kind of dependency graph between random variables using cassette by simply executing the program and tracing what calls what
A =1~Normal(0, 1)
functionX(w)
b = (2~Normal(0, 1))(w)
c = (3~Normal(0, 1))(w)
b + c +A(w)
end
We'd execute X and determine that A is called from it, hence:
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
-
In many (perhaps most) cases the number of random variables is static.
This leads to a number of optimizations
from an API perspective, I can imagine a function
static(x)
which is an assertion by the user thatx
is static and/or as a flag passed into inference algorithms.Since the program is static, we could compile a kind of dependency graph between random variables using cassette by simply executing the program and tracing what calls what
Beta Was this translation helpful? Give feedback.
All reactions