Queries on Posterior Sampling

Skip to first unread message

Andy Lau

Dec 24, 2021, 9:55:02 AM12/24/21
to TensorFlow Probability
Hi , I am a beginning learner of the tensorflow probability. After reading the section about Epistemic Uncertainty on probabilistic regression, I have a query on the posterior sampling. In a variety of articles,  Bayesian inference requires to approximate the posterior distribution. Therefore, I expect the model will include the codes of sampling  algorithm. However, the posterior mean field function only defined a Sequential model and two layers.

Am I mis-understanding or missing something?

Any guidance or advice is much appreciated.

Best regards,

Pavel Sountsov

Dec 28, 2021, 2:19:13 PM12/28/21
to Andy Lau, TensorFlow Probability
The second layer in the `posterior_mean_field` function returns the surrogate posterior distribution that is used for inference in the `DenseVariational` layer. The sampling is performed inside the `DenseVariational` layer by calling the `sample` method on that distribution.

You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprobabilit...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfprobability/2010d91d-20b4-44c9-a591-751e169c0972n%40tensorflow.org.

Andy Lau

Dec 29, 2021, 5:59:24 AM12/29/21
to Pavel Sountsov, TensorFlow Probability
Hi Pavel,

Thank you for your reply.

It makes more sense now. However, this leads me to another fundamental question (forgive my ignorance).

How do I know the posterior distribution sampled by the DenseVariational layer is closely approximating the underlying distribution. Does TFP provide any module to visualize and evaluate the results of approximation?

FYI, I was talking about something like trace plot offered by Arviz.

Best regards,
Reply all
Reply to author
0 new messages