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
The same PR also added ProductNamedTupleDistribution which is a product distribution that returns NamedTuple typed data when calling rand. For ProductNamedTupleDistribution, all the components are independent from each other. An example of it is Distributions.ProductNamedTupleDistribution.
We might want to add support for ProductNamedTupleDistribution and other NamedTupleVariate (that we and others define). This would involve making changes to the syntax, essentially introducing a stochastic version of unpacking.
For instance,
@modelfunctiondemo()
x, y ~product_distribution((x=Normal(), y=Dirichlet([2, 4])))
return x, y
end
I think updating model macro to allow Expr(:tuple, ...) on the LHS shouldn't be too hard. However it might cause some trouble with the tilde pipeline (@mhauru).
We should also think of some corner cases to avoid complications similar to dot-tilde.
The text was updated successfully, but these errors were encountered:
JuliaStats/Distributions.jl#1803 introduced
NamedTupleVariate
.The same PR also added
ProductNamedTupleDistribution
which is a product distribution that returnsNamedTuple
typed data when callingrand
. ForProductNamedTupleDistribution
, all the components are independent from each other. An example of it is Distributions.ProductNamedTupleDistribution.We might want to add support for
ProductNamedTupleDistribution
and otherNamedTupleVariate
(that we and others define). This would involve making changes to the syntax, essentially introducing a stochastic version of unpacking.For instance,
I think updating
model
macro to allowExpr(:tuple, ...)
on the LHS shouldn't be too hard. However it might cause some trouble with the tilde pipeline (@mhauru).We should also think of some corner cases to avoid complications similar to dot-tilde.
The text was updated successfully, but these errors were encountered: