pymc-experimental icon indicating copy to clipboard operation
pymc-experimental copied to clipboard

Support batched constant arguments when marginalising `DiscreteUniform`

Open zaxtax opened this issue 6 months ago • 1 comments

Right now, models like the following fail:

    with MarginalModel() as m:
        mu = pm.DiscreteUniform("mu", lower=[0,10,20], upper=40)
        y = pm.Normal("y", mu=mu, sigma=1.0)
    m.marginalize([mu])

Since lower here takes all constant values, it should be possible to support this

zaxtax avatar Dec 25 '23 17:12 zaxtax

We could take min, max which will work if only a bit inefficient if the intervals have little overlap.

ricardoV94 avatar Jan 03 '24 10:01 ricardoV94