Closed sunxd3 closed 4 months ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/parser/bugs_parser.jl | 1 | 89.06% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 9237944383: | 0.05% |
Covered Lines: | 1436 |
Relevant Lines: | 1738 |
@sunxd3 looks good; do we cover all BUGS models in Vol 1 and Vol 2?
Other than the last four examples from Vol 2, all examples from Vol 1 and 2 are here. I didn't include those examples because either they are not examples on doing inferences (https://www.multibugs.org/examples/latest/Stagnant.html) or they are not very illustrative.
I tried doing HMC (or NUTS) on pretty much all the examples, the results are here. Most examples actually just work. The biggest failure mode is discrete random variable, for instance
a ~ dcat() # Categorical
b ~ dnorm(c[a], 1)
the issue here is a is casted into a float (TrackedReal), but the conversion back to Int is not defined for TrackedReal
). MH with individual proposal should work, although with LogDensityProblems
interface, it is not straightforward to do.
Fix https://github.com/TuringLang/JuliaBUGS.jl/issues/133 (also #188, which seems to be a numerical thing, fixed by using approximately equality test)