Open ordabayevy opened 2 years ago
(Separating this from #593 PR)
This proposes the following logic for the Delta Integrate pattern:
reduced_var
integrand.inputs
delta
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.
log_density
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.
(Separating this from #593 PR)
This proposes the following logic for the Delta Integrate pattern:
reduced_var
is inintegrand.inputs
then apply substitution todelta
andintegrand
:where
log_density
can be a Dice factor or an importance weight in general.reduced_var
is not inintegrand.inputs
then just reducedelta
:where
delta
is normalized.