-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nutpie doesn't compute element-wise log-likelihood #150
Comments
I was searching for this exact issue when using Bambi alongside nutpie. If I use the following code, the log-likelihood is not calcualted:
I also tried the following:
and this did not work either. Thanks for opening up this issue. |
Glad this was useful @djlacombe . I'm actually wondering it this was solved by a recent PR on Bambi (still shouldn't work on when using PyMC directly) 🤔 Could you update to this latest version of Bambi, try it out and report back please? |
Thanks for reminding me. |
#74 is related. |
I updated Bambi to the 0.15 version and ran the two lines of code in my original post separately, i.e.:
and
which sampled just fine but did not produce the log-posterior in the results structure. I think it's actually being calculated because the sampling was finished pretty quickly, it's just that it's not being saved. |
Ok so that means it's on nutpie's side, as @aseyboldt was saying |
That doesn't sound to hard. @djlacombe , do you feel like trying a PR out? |
@AlexAndorra I appreciate the confidence, but I'm not sure if I have the skills to do this. |
That's why we're here for @djlacombe -- answer your questions and guide you along the way. |
The elemwise log-likelihood is not stored in the
InferenceData
that nutpie returns, even when asking for it. The following for instance doesn't error out, but doesn't add alog_likelihood
group to the trace (whereas it does when using the default PyMC sampler):In PyMC it's not that big of a deal (although it adds friction to the user workflow), as one can just do:
But that may be a small issue for Bambi users, which are usually less advanced (cc @tomicapretto). They'd have to do
pooled.compute_log_likelihood(trace_p)
, which takes much more time to computeThe text was updated successfully, but these errors were encountered: