Soss.jl
Soss.jl copied to clipboard
Dependencies not propagated correctly in `predictive`
Consider this model:
julia> m = @model begin
N ~ Poisson(10)
x ~ Normal() |> iid(N)
y ~ For(N) do j
Normal(x,1)
end
end;
julia> predictive(m, :x)
@model x begin
N ~ Poisson(10)
y ~ For(N) do j
Normal(x, 1)
end
end
Clearly in this case x
determines N
, though the original dependency is the reverse. Ideally we'd replace N ~ Poisson(10)
with N = length(x)
. How to get to this is not yet clear.