Skip to content
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

Improve @addlogprob! #390

Open
devmotion opened this issue Mar 7, 2022 · 0 comments
Open

Improve @addlogprob! #390

devmotion opened this issue Mar 7, 2022 · 0 comments

Comments

@devmotion
Copy link
Member

I'm mainly concerned about the, in most cases, incorrect results of logprior currently - which is the main reason for this annoying leafcontext approach. I think this could be fixed by identifying it with a custom observe statement instead of an arbitrary modification of the log probability. One could eg. change the macro syntax to

@addlogprob! val [assume=false] [observe=true]

Then it would still be possible to unconditionally modify the log probability but one could also limit it easily to evaluations that include the likelihood or the prior.

Originally posted by @devmotion in #389 (comment)

@devmotion devmotion changed the title I'm mainly concerned about the, in most cases, incorrect results of logprior currently - which is the main reason for this annoying leafcontext approach. I think this could be fixed by identifying it with a custom observe statement instead of an arbitrary modification of the log probability. One could eg. change the macro syntax to Improve @addlogprob! Mar 7, 2022
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

No branches or pull requests

1 participant