UQWorld

How to specify MOMap for two different measurement systems for the same model

Hi

Let’s say we want to calibrate the same model (with only one output) with two different kinds of measurements (different discrepancy opts). How will we specify the MOMap array for that case? It’s like measuring the beam deflections at the midspan using two instruments of different accuracy. Then updating the same model which predicts beam deflections using the two kinds of data altogether.

The UQLab user manual on page 32 says:

The output IDs specified in the MOMap vector, are not unique. By giving the same index in the MOMap vectors of different data groups, it becomes possible to calibrate the same computational model using measurements gathered in different experiments

This part isn’t really clear to me. I tried giving the same ID to two different data groups and it returns an error:

The supplied MOMap does not uniquely address every model output

I’m reproducing a sample code below:

measures = [2.6, 2.4; 2.9, 2.8]; %Row 1 measured with discrepancy 1 
% and Row 2 measured with discrepancy 2
disc = [0.5, 0.6] % Discrepancies for the two data groups

% First data group
data(1).Name = 'Measurements with discrepancy 1';
data(1).y = measures(1,:)';
data(1).MOMap = 1; % Measurement of model's first and only output
discrepancyopts(1).Type = 'Gaussian';
discrepancyopts(1).Parameters = disc(1);

% Second data group
data(2).Name = 'Measurements with discrepancy 2';
data(2).y = measures(2,:)';
data(2).MOMap = 1; % Measurement of model's first and only output
discrepancyopts(2).Type = 'Gaussian';
discrepancyopts(2).Parameters = disc(2);

What am I doing wrong here?

1 Like

Dear Shihab

Thank you for your question. You discovered a wrong statement in the user manual that we will update in the next release. Assigning multiple discrepancy groups to the same output is, in fact, not currently supported with the Bayesian module. It should be and we will fix this in an upcoming release. There is, however, a way to tweak the current module to achieve what you are trying to do.

First of all slightly modify your forward model myForwardModel to duplicate its output. One simple way to do that would be a wrapper function like

function out = modelWrapper(myForwardModel, x)
% evaluate myForwardModel and duplicate the output columnwise

y = uq_evalModel(myForwardModel,x);
out = [y,y];

Then your new forward model has two outputs and you can modify your data group options to

% First data group
data(1).Name = 'Measurements with discrepancy 1';
data(1).y = measures(1,:)';
data(1).MOMap = 1; % Measurement of model's first output
discrepancyopts(1).Type = 'Gaussian';
discrepancyopts(1).Parameters = disc(1);

% Second data group
data(2).Name = 'Measurements with discrepancy 2';
data(2).y = measures(2,:)';
data(2).MOMap = 2; % Measurement of model's second output !CHANGE!
discrepancyopts(2).Type = 'Gaussian';
discrepancyopts(2).Parameters = disc(2);

Following your analysis, this will result in the expected likelihood function and posterior distribution. The posterior predictive distribution will then be computed for each output separately.

Let me know how it goes :smiley:

2 Likes

Hi Paul

I tried your suggestion by modifying my function to duplicate its output and it works. I’ll try it with a wrapper next time. Thanks a lot for the assistance.

I’d also like to thank and appreciate the efforts by you and the entire team at ETH Zurich in making and managing UQLab. It’s a valuable contribution to the scientific community.

Regards
Shihab :slight_smile:

2 Likes