11.4.2. Defining the TLinearBayesian properties
Once the TLinearBayesian instance is created along with its TDistanceLikelihoodFunction, two methods must
be called before performing parameter estimate. These methods are mandatory, as they define the
analytical formula used to obtain the Gaussian parameter values of the a posteriori
distribution (see [Bla17]).
The first method (although the order is not important) is setRegressorName, whose
prototype is
setRegressorName(regressorname)
The only argument is regressorname, a string containing the list of regressor names separated by “:”.
The method then performs two checks: it verifies that the
number of regressors matches the number of parameters to be calibrated and it checks that
every regressor name provided matches one existing attribute in the reference TDataServer (tdsref).
If the observation
TDataServer does not contain the regressors (when the input file is loaded) these attributes must be
constructed from scratch, either with TAttributeFormula or by using another dedicated assessor
(as done in the use-case shown in Macro “calibrationLinBayesFlowrate1D.py”).
The other method is setObservationCovarianceMatrix, whose prototype is
setObservationCovarianceMatrix(mat)
The only argument here is a TMatrixD whose content is the covariance matrix of the reference
observation data. Once again, this method will check two things:
the provided matrix must have the correct dimensions (both rows and columns must be equal to \(n\));
the provided matrix should be symmetrical;
Once these conditions are satisfied, estimate can proceed. One can find an example of how to use these methods in the use-case dedicated subsection (see Macro “calibrationLinBayesFlowrate1D.py”).