Hello,
I am currently working on the Bayesian inversion. I have some troubles with the discrepancy option, which remains not very clear to me.
Here are some of my thoughts :

The discrepancy seems to be an additive quantity, which is added to the result of the model. Thus, during a Bayesian analysis, one should work with this error. I mean the model becomes Y = M(X) + \epsilon, even during the prior analysis, and to manually plot the histogram of Y, the \epsilon should be added.

Also, as I understand the discrepancy, if a very small quantity is chosen, the result of the Bayesian inversion can be quasi deterministic (the discrete solutions of the equation M(X) = Y_{obs} will appear). It also means it does not allow multiple observations. Thus, without discrepancy, the Bayesian inversion joins the observational method (which X returns the observation).

As the model often comes from hypothesis (finite element softwares etcâ€¦), I understand there is a model bias in practical engineering problems. These approximations are taken into account through the discrepancy term.
The second point explains the need of the discrepancy, to do a Bayesian inversion (with no discrepancy, the inversion will give back discrete values instead of probabilistic ones). It is completed by the third point.
But by combining the 1) and 3) point, one could also implement a discrepancy even without Bayesian inversion, to represent the model bias (even in a simple reliability analysis for example) ?
As I work with a finite element software, do you recommend to choose a discrepancy term for every analysis (problem dependant I guess), or only for Bayesian inversion ? Would you have documentations about the choice of the discrepancy ?
PS : I suggest to describe a little bit more the discrepancy term in the Bayesian user manual. It took me some time to understand that uq_print
adds the discrepancy term to the prior and posterior outputs, in the histograms. Also, I think the discrepancy implementation is a little bit confusing. When defining a Gaussian through Parameters
in the input module, the standard deviation must be filled, but with the discrepancy, the DiscrepancyOpts.Parameters
contains the variance (std squared). Maybe a note could be added in the 2.2.6.1 paragraph of the manual.