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
#696 introduced several new abstractions for model composition in DynamicPPL.jl:
ReturnedModelWrapper
Wraps a model to treat it as a distribution over its return values instead of its parameters.
Example:
@modelfunctiondemo()
x ~Normal()
y = x +1return y
end# ReturnedModelWrapper(demo()) represents distribution over y
Distributional
Sampleable <: Distributional:
Can be sampled from
May not support logpdf computation
Extensions (To be implemented)
latent: (vis-a-vis returned)
Would view model in terms of its parameters rather than returns
Example: For above model, would give distribution over x
Another subtype of Distributional that supports sampling and computing logp
A high level user facing interface to_distribution that would create proper probability distributions with models
Could potentially work with both returned and latent
Integration with NamedTupleVariate
Supporting NamedTupleVariate (#801) would give us a natural interface for to_distribution:
Allowing model to be viewed as distributions over model parameters and their values.
Notice ProductNamedTupleDistribution is not sufficient, because it assumes independence
Limitation is that not all DynamicPPL models can use this interface, as some require the more complex VarName to value mapping rather than simple NamedTuples
The text was updated successfully, but these errors were encountered:
#696 introduced several new abstractions for model composition in DynamicPPL.jl:
ReturnedModelWrapper
Wraps a model to treat it as a distribution over its return values instead of its parameters.
Example:
Distributional
Sampleable <: Distributional
:Extensions (To be implemented)
latent
: (vis-a-visreturned
)x
Distributional
that supports sampling and computing logpto_distribution
that would create proper probability distributions with modelsreturned
andlatent
Integration with
NamedTupleVariate
Supporting
NamedTupleVariate
(#801) would give us a natural interface forto_distribution
:ProductNamedTupleDistribution
is not sufficient, because it assumes independenceThe text was updated successfully, but these errors were encountered: