Hi
Please, correct me if I am wrong. From the far perspective the primary two things that happen behind the scene with Pyro is:

Judgments about joint distribution of observable (
x
) and the nonobservable (z
) latent random variables. These judgments are done in terms of modelfunctions 
Judgments about conditional distributions
p(xz)
andp(zx)
. These judgments are done in terms of guidefunctions for the posterior p(zx). It looks like no special entities are introduced in Pyro forp(xz)
though.
It looks like both the model and the guide are rather expected currently to be written by hand.
Q: Are there any code for generating model and guides in some automated way?
For example, I often get OHEencoded data (or categorical data, which are OHEencoded). As result our observable data is a multivariate Bernoulli distribution with the samples represented as a boolean matrix N*M, where the N is the number of observations and the M is the number of boolean variables.
So, why not to try to assess the model not by hand, but by some automated process?
Also, Bernoulli distribution has a great property: if the prior is expressed as a Beta(a,b) than the posterior is also Beta with the known a and b according to the outcome of the new observation.
So, if weâ€™ve got a boolean OHE data matrix basically without any additional valuable prior knowledge, why canâ€™t we just start with some â€śboilerplatedâ€ť models and guides, which are not created manually, but created in some way natural for the Bernoulli multivariate variables based on the data provided?
Iâ€™d love to see something like model_builder(strategy)
and guide_builder(strategy)
in pyro.distributions.bernoulli
to prebuild some reasonable models and guides.
kind regards,
Valery