Hi all! I’m currently working on a lib that’s laser-focused on constructing + doing inference on Bayesian Networks (see here), and I would love to use numpyro in order to leverage the speed bonuses from XLA compilation found in jax.
My plan is to write out a pyro model based on specification of a PGM using graph-type language (nodes, edges, etc), and then delegate methods like
To begin I’m only considering discrete models, so I’ve been shopping around the various posts on inference using enumeration (
infer_discrete etc.), but I’m unsure what level of abstraction I’m looking for here:
- If I have access to conditional probability tables, is using
opt_einsumenough for inference by variable elim? Or can I use one of the above abstractions to do this in an easier way?
- Would one need to bother creating junction trees in the general case of inference in non-tree-like Bayes nets? Or would I have to somehow manually create a new pyro model based on the junction tree and then delegate to the appropriate inference method?
Thanks for the help!