In my new branch I am currently making some tests for the rules of the GammaMixture node, because there are none.
I encountered the following error:
MethodError: no method matching ReactiveMP.GammaShapeLikelihood(::Float32, ::Float64)
Closest candidates are:
ReactiveMP.GammaShapeLikelihood(::T, ::T) where T<:Real
Do we want GammaShapeLikelihood to be also defined for different float numeric types ?
GammaShapeLikelihood(p::Real, γ::Real) = GammaShapeLikelihood(promote(p, γ)...)
We could also just enforce consistent floating type inside the rule but that sounds kind of sus:
@rule GammaMixture((:a, k), Marginalisation) (q_out::Any, q_switch::Any, q_b::GammaDistributionsFamily) = begin
p = Float64(probvec(q_switch)[k])
[...]
In my new branch I am currently making some tests for the rules of the
GammaMixturenode, because there are none.I encountered the following error:
Do we want GammaShapeLikelihood to be also defined for different float numeric types ?
We could also just enforce consistent floating type inside the rule but that sounds kind of sus: