Venturecxx
Venturecxx copied to clipboard
global_log_likelihood does not include constrained choices with no random choices behind them
venture[script] > observe (normal 0 1) 10
venture[script] > global_log_likelihood
[0]
This is because global_log_likelihood is implemented in terms of regen, and regen only ever cares about things that are downstream of random choices.
Somewhat justified because global_log_likelihood is only defined up to a constant with respect to the current model program anyway, but has the potential to be confusing.
(I thought I had filed an issue for this already, but I can't find it now...)
Generic workaround: force a fake random choice:
venture[script] > observe normal(exactly(0), 1) = 10
venture[script] > global_log_likelihood
[-50.918938533204674]
This is a mirror of the problem I had with Stan doing the same thing. If we are interested in Venture-RIPL models being usable as components of other probabilistic systems, we should probably address this (for example, by adding those exactly
wrappers around input "from the outside world").