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 non-observable (
z) latent random variables. These judgments are done in terms of model-functions
Judgments about conditional distributions
p(z|x). These judgments are done in terms of guide-functions for the posterior p(z|x). It looks like no special entities are introduced in Pyro for
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 OHE-encoded data (or categorical data, which are OHE-encoded). 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
pyro.distributions.bernoulli to pre-build some reasonable models and guides.