-
Notifications
You must be signed in to change notification settings - Fork 85
v0.9.7 Release Notes
Distribution arguments are now checked at run time. For example, trying to create a Bernoulli distribution with success probability of -1 will now produce the following error:
Bernoulli({p: -1});
// => Error: Parameter "p" should be of type "real [0, 1]".
The docs include a list of parameters and the values they can take for each distribution.
Added:
The global variable _
is now bound to lodash
rather than underscore in WebPPL programs.
Many of the functions available as properties of _
will continue to
work as before, but there are some breaking changes. This
(non-exhaustive)
list of differences
between the two describes many of the changes. One change it doesn't
mention is that _.object
is no longer available, though _.fromPairs
offers the same functionality.
Optimize
and the Infer
methods forward
and SMC
now implicitly operate on a global set of
parameters, rather than on parameters passed via an argument.
sample
now expects guide distributions to be wrapped in a function
of zero arguments. For example:
sample(dist, {guide: guideDist})
should now be written:
sample(dist, {guide: function() { return guideDist; }});
See the docs for more.
The ignoreGuide
option of SMC has been replaced with a new
importance
option. See the
docs
for details of this new option.