Looking for documentation/example of using UQLab results of Bayesian inference for forward UQ or further Bayesian inference


I am looking for a documentation or an example about using the UQLab results of Bayesian inference, i.e. the outputs ot uq_createAnalysis and uq_postProcessInversion, to perform

  • forward UQ and/or
  • a further Bayesian inference using the posterior measure of the first Bayesian inference as prior measure.

I think that I could use the samples in ...result.PostProc.PostSample to perform forward UQ, and could use the computed mean, standard deviation and correlation matrix to define within an appropriate set of densities an approximation of the posterior density, but would be grateful for any hints.


Hi Olaf

There is currently no example that explains this - but using the .Results.PostProc.PostSample is the correct starting point. There are a couple of things you can do with this sample, but first of all, you will have to transform it to a 2D array with

PostSample2D = reshape(permute(PostSample3D, [2 1 3]), size(PostSample3D, 2), []).'

You could then, of course, directly propagate this sample through a different forward model, but to use advanced UQ methods (or for another round of inference where this posterior measure is used as a prior measure), you will have to find a parametric distribution that can be used to represent this sample.

For this, I suggest you have a look at the new input module that was released in v.1.3 of UQLab. More specifically, have a look at the inference of marginals and copulas as detailed in this example. This will allow you to define a new uq_input object using the posterior sample. This object can then be used to do any UQ analysis you desire.

Let me know how it goes!

Dear Paul-Remo,

thanks for your answer and your advice.
I think I will start with using the sample such that I can take advantage of the fact that my time-dependent forward model can be written as the sum of a summand that must be updated in every time step and a summand that stays constant for some time.
Later I will try to deal with marginals and copulas.
Okay, since I knew now that there is a way to use the results of the Bayesian inference I have to start to implement the inference for my problem.