Skip to content

Add log-likelhood calculation to sampling #230

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

fonnesbeck
Copy link
Member

This allows nutpie to populate the log_likelihood group in ArviZ InferenceData objects when compute_log_likelihood=True is passed to compile_pymc_model().

Closes #150

@fonnesbeck fonnesbeck requested a review from aseyboldt July 18, 2025 20:43
@fonnesbeck
Copy link
Member Author

Works in numba mode, but not jax.

@ricardoV94
Copy link
Member

Why not just use pm.compute_log_likelihood?

@fonnesbeck
Copy link
Member Author

@ricardoV94 for calculating likelihoods during sampling? I thought that only worked after posterior sampling. I want to calculate them on the fly if I need them, rather than having another manual step.

@ricardoV94
Copy link
Member

Add it as a model deterministic then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nutpie doesn't compute element-wise log-likelihood
2 participants