Skip to content

Improve @addlogprob! #390

@devmotion

Description

@devmotion

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions