Closed insperatum closed 7 years ago
I was experimenting with the following model and came across some surprising behaviour. Running on webppl.org as of today:
var dist = Uniform({a:0, b:1}) var guide = Beta({a:2, b:1}) var model1 = function() { var y = sample(guide) factor(dist.score(y) - guide.score(y)) return y } var model2 = function() { var y = sample(guide) factor(dist.score(y) - guide.score(y)) return {x:"foo", y:y} } viz(Infer({method:"MCMC", samples:100000}, model1)) viz(Infer({method:"MCMC", samples:100000}, model2))
The distribution for model1 looks like dist (as it should) while the distribution for model2 looks like guide.
model1
dist
model2
guide
This looks like a problem with webppl-viz, I've opened probmods/webppl-viz#84 with a potential fix.
Thanks for reporting this!
I was experimenting with the following model and came across some surprising behaviour. Running on webppl.org as of today:
The distribution for
model1
looks likedist
(as it should) while the distribution formodel2
looks likeguide
.