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
I have been using the generated_quantities function to draw samples from the posterior distribution (as described in this youtube video at around 1h into the video).
This has been working until I recently updated the packages, but now there's an error for models using broadcasting.
using Turing
@modelfunctionbinoflip(n, k)
p ~Beta(1, 1)
k ~Binomial(n, p)
return (; p, k)
end
n =100
k =sum(rand(Bernoulli(0.3), n) .==1)
model_binoflip =binoflip(n, k)
chain_binoflip =sample(model_binoflip, NUTS(), 1000)
quantities_binoflip =let
model_missing_binoflip =binoflip(n, missing)
generated_quantities(model_missing_binoflip, chain_binoflip)
end# Looks good!@modelfunctionbernflip(y)
p ~Beta(1, 1)
y .~Bernoulli.(p)
return (; p, y)
end
y =rand(Bernoulli(0.3), n)
model_bernflip =bernflip(y)
chain_bernflip =sample(model_bernflip, NUTS(), 1000)
quantities_bernflip =let
model_missing_bernflip =bernflip(missing)
generated_quantities(model_missing_bernflip, chain_bernflip)
end# MethodError: no method matching dot_assume(...)
The text was updated successfully, but these errors were encountered:
I went back to the commit where I thought the code was working. If I read the Manifest correctly, Turing was on v0.24.4 before the update that I blamed. And indeed, only the model with ~, not the one with .~, worked with the above generated_quantities code. I must have recalled incorrectly, thinking that both were working. Sorry!
Hi,
I have been using the
generated_quantities
function to draw samples from the posterior distribution (as described in this youtube video at around 1h into the video).This has been working until I recently updated the packages, but now there's an error for models using broadcasting.
The text was updated successfully, but these errors were encountered: