Closed devmotion closed 2 years ago
e.g. using arraydist and filldist
We could deprecate filldist
right away and instead use arraydist(Fill(dist, N))
but it's a bit more (too?) verbose. Internally, actually Distributions.product_distribution(Fill(dist, N))
will result in exactly the same objects and behaviour as filldist(dist, N)
for almost all distributions: https://github.com/TuringLang/DistributionsAD.jl/blob/48c43f8e8062ba95542330735593b5275117e592/src/filldist.jl#L9-L12
Personally, I'd depreciate filldist
and encourage users to use arraydist(Fill(dist, N))
from now. If it is too verbose, we can perhaps consider sugar syntax like arraydist(dist, IID, N)
where IID indicate the relationship between elements in the array?
IMO arraydist(Fill(...))
would be a bit simpler and more consistent API. And also closer to something like product
or product_distribution
that we (hopefully) will use at some point.
When updating some other tutorials, I noticed that maybe we should use (and hence somewhat promote)
filldist
already in the coinflip example.I think it should be more well-known and used (even though I would still like to unify and extend it in Distributions), since it
missing
and/or type parameters),for
loops but allows AD backends to use an optimized implementation)