
Bayesian inference for model calibration and inverse problems
'Sample': [[[...], [...]], [[...], [...]], ..., [[...], [...]]],
'Acceptance': [...],
'Time': ...,
'ForwardModel': {'evaluation': [[...], [...], ..., [...]]},
'LogLikeliEval': [[...], [...], ..., [...]],
'PostProc': {...}
}
The sample points are stored in the 3D list Sample with a regular shape T × M × C. The
associated forward model and log likelihood evaluations are stored in the ForwardModel
dictionary and LogLikeliEval list of lists with a regular shape T × C respectively.
Sample points generated by MCMC algorithms typically require post-processing before they
can be used as a true posterior sample. In the Bayesian module of UQ[PY]LAB this post-
processing is automatically done with the uq.postProcessInversionMCMC function that is
called for MCMC analyses by the wrapper function:
myBayesianAnalysis = uq.postProcessInversion(myBayesianAnalysis)
This function is called automatically after every analysis and performs a set of default post-
processing procedures: the first half of all sample points generated by the MCMC chains are
removed, the empirical parameter mean is estimated from these remaining sample points
along with the 2.5th and 97.5th percentiles, the covariance matrix is estimated, and samples
are drawn from the prior distribution and posterior predictive distribution.
These post-processing results are then stored in the PostProc dictionary inside the Results
dictionary. If uq.postProcessInversion is called with all possible options (see Sec-
tion 3.3), it contains the following keys of myBayesianAnalysis['Results']['PostProc']
dictionary
{
'PostSample': [[[...], [...]], [[...], [...]], ..., [[...], [...]]],
'PostLogLikeliEval': [[...], [...], ..., [...]],
'PostModel': {'evaluation': [[...], [...], ..., [...]]},
'PointEstimate': {'ForwardRun': {...}, 'X': [...], 'Type': ...},
'Dependence': {'Corr': [[...],[...]], 'Cov': [[...],[...]]},
'Percentiles': {'Values': [[...],[...]], 'Probabilities': [...],
'Mean': [...], 'Var': [...]},
'PriorSample': [[...], [...], ...,[...]],
'PostPredSample': {'ModelEvaluations': [...], 'Sample': [...],
'Discrepancy': [...]},
'ChainsQuality': {'BadChains': [...], 'GoodChains': [...]},
'MPSRF': ...,
'PriorPredSample': {'ModelEvaluations': ..., 'Sample': ...,
'Discrepancy': ...}
}
where the value of the PostSample key is a regular nested list of size T"xMxC" and type float,
where T" is the length of the MCMC chains without the burn in, C" is the number of chains
excluding the badChains and P is the number of drawn prior sample points. The value of
UQ[PY]LAB-V1.0-113 - 43 -