DistributionsAD.jl
DistributionsAD.jl copied to clipboard
There's little documentation for `filldist` and `arraydist`
The only explanation of filldist
I could find is here: https://turing.ml/dev/docs/using-turing/performancetips#special-care-for-tracker-and-zygote
filldist(dist, N)
creates a multivariate distribution that is composed ofN
identical and independent copies of the univariate distributiondist
ifdist
is univariate, or it creates a matrix-variate distribution composed ofN
identical and idependent (sic) copies of the multivariate distributiondist
ifdist
is multivariate.filldist(dist, N, M)
can also be used to create a matrix-variate distribution from a univariate distributiondist
.
However, ?filldist
says:
search: filldist
Out[66]:
No documentation found.
DistributionsAD.filldist is a Function.
# 4 methods for generic function "filldist":
[1] filldist(d::Normal, N::Int64) in DistributionsAD at /Users/forcebru/.julia/packages/DistributionsAD/pj8zf/src/filldist.jl:12
[2] filldist(dist::UnivariateDistribution{S} where S<:ValueSupport, N::Int64) in DistributionsAD at /Users/forcebru/.julia/packages/DistributionsAD/pj8zf/src/filldist.jl:9
[3] filldist(dist::UnivariateDistribution{S} where S<:ValueSupport, N1::Integer, N2::Integer) in DistributionsAD at /Users/forcebru/.julia/packages/DistributionsAD/pj8zf/src/filldist.jl:64
[4] filldist(dist::MultivariateDistribution{S} where S<:ValueSupport, N::Int64) in DistributionsAD at /Users/forcebru/.julia/packages/DistributionsAD/pj8zf/src/filldist.jl:83
Same thing for arraydist
.
Also, the code of @model function tmodel(x, y)
at https://turing.ml/dev/docs/using-turing/performancetips#ensure-that-types-in-your-model-can-be-inferred seems to be the only example of filldist
usage in the documentation...