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

Add a default implementation of regenerate in terms of generate and project #73

Open
marcoct opened this issue Feb 10, 2019 · 0 comments

Comments

@marcoct
Copy link
Collaborator

marcoct commented Feb 10, 2019

Add the requirement that

q(t; x, u) = q(t; x, u|_{dom t})

Practically speaking, this means that sampling from q should never need to read the values of addresses from u that it doesn't end up putting in the trace. This is indeed the case in ancestral sampling.

The motivation for making this restriction is that it makes it possible to provide a generic default implementation of regenerate in terms of generate and project. This implementation does not exploit incremental computation, but it is nice that there is a default one.

  1. given initial choice map t, initial args, x, new args, x', selection set A
  2. construct choice map u that is the restriction of t to the complement of A
  3. run generate(f, x', u), obtaining new choice map t' and weight w'
  4. B = dom(t') setminus I
  5. w = project(t, B)
  6. return t', weight=w'/w
@marcoct marcoct changed the title Add requirement on the internal proposal family to the docs Add a default implementation of regenerate in terms of generate and project Feb 10, 2019
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