Replies: 1 comment 1 reply
-
So in the particular case of But in general, we probably need something like a Can I ask exactly what you need from the model? E.g. is it just the joint probability you need? Do you need to sample from the prior? Depending on what you need it, it might be possible without waiting for the above work:) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm developing an inference algorithm for hierarchical problems which I'd like to hook into Turing, and one of its requirements is sampling observed quantities conditioned on a set of values for the hyperparameters (ie, the parameters on the first "rung" in the hierarchy; fwiw, a similar requirement as for ABC). Statistically this is straightforward by just doing a forward simulation, but I'm not sure to what extent the Turing interface allows it generally.
As a toy example, consider the hierrchical model:
The user would generally call
model = hierarchical(x)
for some observed valuex
, then passmodel
along to my algorithm (or toTuring.sample
,Turing.optimize
, etc...). The requirement of my algorithm is that as part of it, I need to draw samples fromP(x|θ)
for different values of θ which the algorithm chooses. Is this possible from only themodel
object?One option (which I'd like to avoid) is I could force the user to include the hyperparameters as an explicit argument:
in which case evaluating something like
hierarchical(missing, 0.3)()
gives me exactly the quantity I'm looking for, and I can just force the user to also pass along thehierarchy
function itself, not justmodel
. But is there any way to do this without making the user do, so that it works like more standard Turing? Thanks.Beta Was this translation helpful? Give feedback.
All reactions