You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, := variables are "tracked" as if they are just random variables. This can be annoying in certain cases where we make use of chains obtained from sample calls, e.g. when using generated_quantities, since variables in := expressions aren't treated differently.
Ideally, we should keep track of which variables are actually "deterministic" (i.e. occur in a := expression) vs. "random" (i.e. occur in a ~ expression).
Example:
julia>using DynamicPPL, Distributions
julia>@modelfunctiondemo()
x ~Normal()
y := x +100end;
julia> model =demo();
julia> varinfo =VarInfo(model);
julia>values_as(varinfo, OrderedDict)
OrderedDict{VarName{:x, typeof(identity)}, Float64} with 1 entry:
x =>0.66373
julia>values_as_in_model(model, varinfo)
OrderedDict{Any, Any} with 2 entries:
x =>0.66373
y =>100.664
Ideally, the values_as_in_model should also keep track of which are considered determinstic and random.
This should be fairly "trivial" to add, since it's mainly an issue of adding the some way to keep track of this information in the tilde calls, e.g. here
Currently,
:=
variables are "tracked" as if they are just random variables. This can be annoying in certain cases where we make use ofchains
obtained fromsample
calls, e.g. when usinggenerated_quantities
, since variables in:=
expressions aren't treated differently.Ideally, we should keep track of which variables are actually "deterministic" (i.e. occur in a
:=
expression) vs. "random" (i.e. occur in a~
expression).Example:
Ideally, the
values_as_in_model
should also keep track of which are considered determinstic and random.This should be fairly "trivial" to add, since it's mainly an issue of adding the some way to keep track of this information in the tilde calls, e.g. here
DynamicPPL.jl/src/values_as_in_model.jl
Lines 65 to 77 in 1d10278
Miiight be a nice issue for you @penelopeysm to have a go at if you want? Should be a nice way to familiarize yourself with DynamicPPL.jl:)
Tag: @mhauru
The text was updated successfully, but these errors were encountered: