-
I would like to specify a simple model, where I use a multivariate normal for one of the factors. The structure is:
However none of the below specifications succeed: @model function model(a)
a ~ Normal(mean = 1., var = 5.)
b ~ Normal(mean = 2., var = 5.)
[a, b] ~ MvNormal(mean = zeros(2), covariance = diageye(2))
end
@model function model(ab)
ab ~ MvNormal(mean = zeros(2), covariance = diageye(2))
ab[1] ~ Normal(mean = 1., var = 5.)
ab[2] ~ Normal(mean = 2., var = 5.)
end
@model function model(a)
ab ~ MvNormal(mean = zeros(2), covariance = diageye(2))
a ~ Normal(mean = 1., var = 5.)
b ~ Normal(mean = 2., var = 5.)
a ~ ab[1]
b ~ ab[2]
end
Do you have any pointers to similar examples or general tips about the approach? |
Beta Was this translation helpful? Give feedback.
Answered by
albertpod
Sep 24, 2025
Replies: 1 comment 7 replies
-
Hi @keorn, could you please write the probabilistic generative model? I fail to see what are your observations here. You could write something like this, but not sure that's what you mean. using RxInfer
@model function ivy_model(y)
a ~ Normal(mean = 1., var = 5.)
b ~ Normal(mean = 2., var = 5.)
c1 = [1, 0]
c2 = [0, 1]
y ~ MvNormal(mean = c1 * a + c2 * b, covariance = diageye(2))
end
result = infer(model=ivy_model(), data=(y=[10, 200],), free_energy=true) |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
keorn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @keorn, could you please write the probabilistic generative model? I fail to see what are your observations here.
You could write something like this, but not sure that's what you mean.