Venturecxx
Venturecxx copied to clipboard
Dirichlet categorical logDensityOfData ignores the options, provides no feedback on it.
Consider again the problem from #451:
assume x1 = flip()
assume x2 = flip()
force x1 = true
force x2 = true
assume f = make_dir_mult(array(1, 1), array(x1, x2))
observe f() = false
In addition to not crashing during inference, the observation should provide a feedback force on the values of x1
and x2
: In the posterior, they can't both be true, and both false is twice as likely as either configuration in which they are not equal. At present, however, no such feedback is provided, because the logDensityOfData
method only concerns itself with positionally-indexed counts of which option was selected when. In effect, the counts of returned values are reinterpreted (incorrectly) whenever the input options change, to refer positionally to the new options instead of the old ones.
#453 is the plan to fix this. Marking blocked on that.