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

Dependencies not propagated correctly in `predictive`

Open cscherrer opened this issue 4 years ago • 0 comments

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.

cscherrer avatar Dec 03 '19 00:12 cscherrer