You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PointMass constraints in SP, the behaviour is incorrect as in this issue on RxInfer. Patching this using RequireMarginals on both adjacent nodes also results in either not updating the variables (example below) or in asking for missing rules (notebook).
Example
using RxInfer, LinearAlgebra
# adds missing rule (solved in addons PR)@ruleCategorical(:out, Marginalisation) (m_p::Dirichlet,) =beginreturnCategorical(normalize(mean(m_p), 1))
end@modelfunctionmodel_issue()
y =datavar(Vector{Float64})
α ~Dirichlet(0.01.*ones(3))
z_old ~Categorical(α) where { pipeline =RequireMarginal(out) }
z_new ~Transition(z_old, diagm(ones(3))) where { pipeline =RequireMarginal(in) }
y ~Transition(z_new, diagm(ones(3)))
return y, z_new, z_old, α
end@constraintsfunctionconstraints_issue()
q(z_old) ::PointMassend
results_combination =inference(
model =model_issue(),
data = ( y = [1.0, 0.0, 0.0], ),
constraints =constraints_issue(),
returnvars = ( α=KeepLast(), ),
)
The text was updated successfully, but these errors were encountered:
When using
PointMass
constraints in SP, the behaviour is incorrect as in this issue onRxInfer
. Patching this usingRequireMarginals
on both adjacent nodes also results in either not updating the variables (example below) or in asking for missing rules (notebook).Example
The text was updated successfully, but these errors were encountered: