Say I have some model where a latent variable, let’s say Z, influences two discrete observed variables, say X1 and X2. My Pyro programme has learned parameter values for the influences of Z on both X variables, and has done so with a SVI approach, so I have a model and a guide function.
Is there an easy, straight-forward way of obtaining the conditional probabilities of one X variable on the other, for instance p( X1 = 1 | X2 = 1 )?
If z is not a discrete enumerated variable, you’ll need to implement a guide that can infer z from partial observations, i.e. of x2 but not x1. Then you can simply trace the guide and replay the model.