pymc-experimental
pymc-experimental copied to clipboard
`MarginalModel.unmarginalize` doesn't accept `var_names`
import pymc as pm
from pymc_experimental import MarginalModel
with MarginalModel() as m:
x = pm.Bernoulli("x", p=0.5)
y = pm.Normal("y", x)
m.marginalize(["x"])
m.unmarginalize(["x"]) # ValueError: list.remove(x): x not in list
m.unmarginalize([x])
is fine, but this is problematic because x
may not be accessible to the caller
CC @zaxtax
Maybe by default m.unmarginalize()
could also unmarginalize all marginalized_rvs
These are both good ideas
On Wed, 14 Feb 2024, 18:07 Ricardo Vieira, @.***> wrote:
Maybe by default m.unmarginalize() could also unmarginalize all marginalized_rvs
— Reply to this email directly, view it on GitHub https://github.com/pymc-devs/pymc-experimental/issues/309#issuecomment-1944251868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACCUJ74TBBBVTV6EZA6LDYTTVO3AVCNFSM6AAAAABDIUTBZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGI2TCOBWHA . You are receiving this because you were mentioned.Message ID: @.***>