How to make prediction when there is local latent variable in the graph

moved from


Hi Dustin:

Let’s say you want to build a predictive model in a Bayesian way, to predict y_i based on x_i , and in the graph definition P(y_i, x_i, z_i, beta), there is a local latent variable z_i that is dependent on x_i and global parameter beta, and y_i is dependent on all the rest.

I want to know, in this case, after making inference on z_i and beta based on the training data, how to make predictions when the test data x_test comes in. Since z_i is dependent on x_i, how can I update z_i to the z_test ? As in my understanding, the approximator q_z_i is only valid on the training data set, therefore, you cannot simply q_z_i.copy(), and in GMM, the z_i can just be easily reset by, because z_i is not dependent on x_i.

Many thanks,

Check out the tutorial. In the point-based evaluation section, we explain how to make test inferences.