ReactiveMP.jl icon indicating copy to clipboard operation
ReactiveMP.jl copied to clipboard

Relax constraints for Gaussian Mixture update rules

Open albertpod opened this issue 2 years ago • 0 comments

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.

albertpod avatar Oct 13 '22 16:10 albertpod