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

Delta integrate pattern #595

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Delta integrate pattern #595

wants to merge 2 commits into from

Conversation

ordabayevy
Copy link
Member

@ordabayevy ordabayevy commented May 5, 2022

(Separating this from #593 PR)

This proposes the following logic for the Delta Integrate pattern:

  • If reduced_var is in integrand.inputs then apply substitution to delta and integrand:
delta = Delta("x",  point, log_density)
integrand = Variable("x")
Integrate(delta, integrand, reduced_vars="x")
  => delta(x=point).exp() * integrand(x=point)
  => log_density.exp() * point

where log_density can be a Dice factor or an importance weight in general.

  • If reduced_var is not in integrand.inputs then just reduce delta:
delta = Delta("x",  point, log_density)
integrand = Number(3.0)
Integrate(delta, integrand, reduced_vars="x")
  => delta.reduce(logaddexp, "x").exp() * integrand
  => 1 * 3.0
  => 3.0

where delta is normalized.

@ordabayevy ordabayevy marked this pull request as draft June 2, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants