aesara-devs / aemcmc

AeMCMC is a Python library that automates the construction of samplers for Aesara graphs representing statistical models.
https://aemcmc.readthedocs.io/en/latest/
MIT License
39 stars 11 forks source link

`deterministic_vars` and `updates` should be optional to initialize `ModelInfo` #40

Closed rlouf closed 2 years ago

rlouf commented 2 years ago

Indeed these are not needed for many models, for instance the following toy example:

import aesara.tensor as at
from aesara.tensor.random import RandomStream

from aemcmc.utils import ModelInfo

srng = RandomStream(0)
a_rv = srng.normal(0, 1, name="a")
b_rv = srng.normal(a_rv, 1, name="b")

a_vv = a_rv.clone()
a_vv.name = "a_vv"

b_at = at.scalar(name="b_at")

model = ModelInfo((b_rv,), {a_rv: a_vv, b_rv: b_at}, (), ())