webppl icon indicating copy to clipboard operation
webppl copied to clipboard

Add an init option to sample

Open longouyang opened this issue 7 years ago • 2 comments

So that we have some way of initializing by hand when it's hard to do so automatically

Examples:

var foo = sample(Gaussian({mu: 0, sigma: 1}), {init: 10}); // static init
var bar = sample(Beta({a: 2, b: 2}));
var baz = sample(Exponential({a: 6}), {init: foo + bar}); // dynamic init

(Though it might make more sense to declare dynamic inits as functions that are only run while trying to initialize)

longouyang avatar Aug 02 '16 17:08 longouyang

@null-a: This was addressed by #786, right?

hawkrobe avatar Mar 06 '17 19:03 hawkrobe

@hawkrobe: No, that added an init option to param, not sample.

null-a avatar Mar 06 '17 19:03 null-a