Dear @paulremo, dear all,
I think I have found an inconsistency between the manual for Bayesian inversion and the code in
uq_postProcessInversion.m if one is calling this function with an integer value for the
burnIn parameter: Denoting this value by
burnInIntValue it holds that:
- According to the documentation, page 57,
burnInIntValuesample should be removed (i.e. not copied to the contents of
Results.PostProc) as burn in.
- In the lines 346–349 of
uq_postProcessInversion.mit holds that the execution is stopped, if
burnInIntValueis equal or greater then the size of the
Samplesvector, and afterwards, by the code line
Sample = Sample(burnIn:end,:,:);it ensured that
burnInIntValuesamples are removed as burnIn.
Hence, one is not able to (miss)use
uq_postProcessInversion.m to remove all but the last set of samples for the MCMC AIES sampler and to generate afterwards a scatter plots for point in this set by calling
uq_display. I would like to do this since I follow the suggestion in the solution to Restarting a Bayesian Inversion and use these sample points as starting vector for further Bayesian inversions using the MCMC AIES sampler.
To avoid modification that change results of existing running code I suggest to replace in the documentation the text for integer values for
burnIn from ``Specifies the number of sample points that are discarded as burn-in.’’ to something like ```Specifies the index of the the first sample points that is not discarded as burn-in, i.e. the number of discarded samples is equal to the given value minus 1. ‘’ I wanted to suggest to replace in the code
if burnIn >= size(Sample,1) in line 345 the
>., but this does not produce the desired result.