TuringLang / DistributionsAD.jl

Automatic differentiation of Distributions using Tracker, Zygote, ForwardDiff and ReverseDiff
MIT License
151 stars 30 forks source link

filldist problem with InverseWishart #80

Open drmarios opened 4 years ago

drmarios commented 4 years ago

I'm trying to setup InverseWishart prior in my Turing.jl model as follows:

τ ~ filldist(InverseWishart(2+1, Matrix{Float64}([[3,0.5] [0.5,3]])), 10)

and getting error message:

MethodError: no method matching filldist(::InverseWishart{Float64,PDMats.PDMat{Float64,Array{Float64,2}}}, ::Int64)

This is with latest version of Julia\Turing

HarrisonWilde commented 3 years ago

Bumping this one as running into it as well

yebai commented 3 years ago

@mohamed82008 Does filldist support matrix-variate distributions?

mohamed82008 commented 3 years ago

I don't think so.

devmotion commented 3 years ago

I assume it is not supported since Distributions only contains types and methods for uni-, multi-, and matrixvariate distributions. Therefore filldist (and arraydist) only support vectors and matrices of univariate distributions and vectors of multivariate distributions, which yield multi- and matrixvariate distributions. Other combinations do not fit into the categories of uni-, multi-, and matrixvariate distributions in Distributions.