ReactiveBayes / ExponentialFamily.jl

ExponentialFamily.jl is a Julia package that extends the functionality of Distributions.jl by providing a collection of exponential family distributions and customized implementations.
https://reactivebayes.github.io/ExponentialFamily.jl/
MIT License
12 stars 2 forks source link

Support `UniformScaling` in multivariate normal constructors #176

Closed bartvanerp closed 7 months ago

bartvanerp commented 8 months ago

I was just running some code from a couple months ago and it seems that we lost the following functionality:

MvNormalMeanCovariance(randn(4), 100I)

It throws

MethodError: no method matching ExponentialFamily.MvNormalMeanCovariance(::Vector{Float64}, ::LinearAlgebra.UniformScaling{Int64})

In terms of user-friendliness the above syntax should be supported again, whilst maintaining the computational benefits of the UniformScaling struct.

bvdmitri commented 8 months ago

I've checked ReactiveMP@3.11.1 before integration with ExponentialFamily.jl and it did work there as well, but it materialised the matrix (using the Diagonal type). So its definitely a regression. Can you work on it @bartvanerp ? If yes, I add it to the milestone.