Dear Olaf
You are right - the computation of the posterior predictive distribution fails when the check for the uniqueness of the MOMap
is disabled in the initialization. In fact, the theory section of the current Bayesian manual is missing a proper introduction of data groups and associated posterior predictive distribution computation. I attach below a new subsection that will be included in the next version of the Bayesian module containing such an introduction.
1.2.4 Multiple data groups
In practice it occurs frequently that the measurements \mathcal{Y} stem from various measurement devices or experimental conditions with different discrepancy properties. In these cases, it is necessary to arrange the elements of \mathcal{Y} in disjoint data groups and define different likelihood functions for each data group.Denoting the g-th data group by \mathcal{G}^{(g)} = \{\mathbf{y}_i\}_{i\in\boldsymbol{\mathsf{u}}}, where \boldsymbol{\mathsf{u}}\subseteq\{1,\cdots,N\}, the full data set can be combined by
\mathcal{Y} = \bigcup_{g=1}^{N_{\mathrm{gr}}}\mathcal{G}^{(g)}.Each of the N_{\mathrm{gr}} data groups contains measurements collected with the same instruments under similar measurement conditions. With this, it is clear that each data group requires a different likelihood function \mathcal{L}^{(g)} describing the experimental conditions that led to measuring \mathcal{G}^{(g)}. Possible choices for \mathcal{L}^{(g)} are presented in Section 1.2.2 and Section 1.2.3.
Under the assumption of independence between the N_{\mathrm{gr}} measurement conditions, the full likelihood function can then be written as\mathcal{L}(\mathbf{x}_{\mathcal{M}}, \, \mathbf{x}_{\mathcal{\varepsilon}};\mathcal{Y}) = \prod_{g=1}^{N_{\mathrm{gr}}}\mathcal{L}^{(g)}(\mathbf{x}_{\mathcal{M}}, \mathbf{x}_{\mathcal{\varepsilon}}^{(g)};\mathcal{G}^{(g)}),where \mathbf{x}_{\mathcal{\varepsilon}}^{(g)} are the parameters of the g-th discrepancy group.
With this, it is natural to define predictive distributions for each data group individually through
where \mathbf{g} is a variable collecting only the outputs addressed in the g-th data group.
In the current version of the Bayesian module (1.3.0), every model output can only be compared to one data point (and possible multiple measurements thereof). The predictive distributions are therefore expressed for each forward model independently.
When the restriction of uniqueness is lifted, however, this is no longer possible because the same model output might be compared to measurements of different data groups. To properly express the predictive distributions, the original formulation will be used in the next version of UQLab. The predictive distributions will, therefore, be computed and plotted for each data group separately. This distribution then captures the uncertainty we expect in measurements made with the g-th measurement device.
To get back to your specific problem, I attach three functions from the upcoming next version of the Bayesian module that you can use to overwrite the existing functions of the same name. You should then be able to run your analysis with non-unique MOMap
entries.
uq_display_uq_inversion.m (19.9 KB)
uq_initialize_uq_inversion.m (30.9 KB)
uq_postProcessInversion.m (19.4 KB)
I hope this clarifies your questions - let me know if it does not and I greatly appreciate your in-depth review of the module.