Closed wmkouw closed 1 month ago
Ah yes I see, we have a similar issue already https://github.com/ReactiveBayes/ExponentialFamily.jl/issues/192.
Thanks for reporting! Yes indeed, the conversion is just good enough.
Conversion is enough, InverseWishartFast
is just InverseWishart
without checks, so if we can create an InverseWishart
distribution we can create an InverseWishartFast
distribution out of it. I'll open a PR in a couple of minutes
@wouterwln I haven't seen your message, can you then also add this, just merge into your branch to fix another issue as well https://github.com/ReactiveBayes/ExponentialFamily.jl/pull/217/files?
Expected behaviour of
ProductOf{InverseWishart{Float64, PDMats.PDMat{Float64, Matrix{Float64}}}, ExponentialFamily.InverseWishartFast{Float64, Matrix{Float64}}}
But I get
This error occurs when specifying a state-space model with an unknown process noise covariance matrix:
After a discussion in the lab, we discovered this was due to a missing conversion to WishartFast when parsing parametric specifications from Dictionaries.
But upon inspection of wishart.jl, it seems that products of
Wishart
andInverseWishart
are no longer supported. I think it's very important to be able to play with distribution products when designing a model (i.e., what has a closed product and what doesn't). So I advocate for implementing the product rules forWishart
andInverseWishart
types. The easiest approach is probably to just convert types, butprod(ClosedProd(), Wishart(..), Wishart(..))
and other type combinations within the Wishart family should be possible.