ReactiveMP.jl
ReactiveMP.jl copied to clipboard
Relax constraints for Gaussian Mixture update rules
The current implementation of the update rules for Gaussian Mixture is very strict given the mean-field assumption around this node.
For example, the constraint on q_m
can be relaxed from UnivariateNormalDistributionsFamily
to Any
(same applies to q_p
)
@rule NormalMixture{N}(:out, Marginalisation) (
q_switch::Any,
q_m::ManyOf{N, UnivariateNormalDistributionsFamily},
q_p::ManyOf{N, GammaDistributionsFamily}
) where {N} = begin
πs = probvec(q_switch)
return NormalMeanPrecision(sum(πs .* mean.(q_m)), sum(πs .* mean.(q_p)))
end
A similar problem occurs for the update rules on other interfaces for GM node.