Hi,

I am looking into Kriging metamodelling especially this example provided by UQLab below:

KRIGING METAMODELING: BRANIN-HOO FUNCTION

Is it possible to run a model with 5 probabilistic input models instead of only 1 or 2? I have an issue as how to obtain the figures displayed using the examples. The error message appears to be only 1 and 2 dimensional X’s are supported. Is it possible to make the figures for more than 2 inputs?

Thank you!

Visha

Hi @Vishashalu,

While it is always possible to evaluate a model with more inputs (if the model allows for it), UQLab only supports plotting the results of metamodeling up to 2 dimension.

Perhaps you can be more specific on what kind of plots you’d like to see for more than 2 input variables? If you, say make a sketch, what would be displayed?

Hi Damar,

Actually it is about the estimation of moments using these metamodels. Because I saw in the example under Kriging for the multiple input dimension topic, the Kriging predictor mean and variance can be quickly visualized using the uq_display function.

So once we create the metamodel using Kriging and PCE-Kriging methods and with my 5 input model, I am unsure of how to obtain these statistical moments similar to PCE model for e.g. with the subtopic example on the ( PCE METAMODELING: ESTIMATION OF STATISTICAL MOMENTS MONTE-CARLO- VS PCE-BASED ESTIMATION OF MOMENTS)

I just wanted to know how can I see what the comparison of MCS based model and the metamodels based moments looks like.

Thanks!

Best regards,

Visha

For PCE metamodels, the first and second moment can be directly obtain from the coefficients, as you seen in the example you mentioned. However, for Kriging and PC-Kriging, you basically need to do Monte Carlo simulation but by using the metamodel instead of the full computational model. That is: generate (input) sample points, evaluate the metamodel, and then compute the mean and standard deviation (or variance) from the outputs.

Assuming you have created a Kriging metamodel stored in `myKriging`

, then:

```
% Get a sample from the probabilistic input model
X_ED = uq_getSample(1e4,'LHS');
% Evaluate the metamodel on the current experimental design
Y_Krg = uq_evalModel(myKriging,X_ED);
% Calculate the moments
mean_Krg = mean(Y_Krg);
std_Krg = std(Y_Krg, 0, 1);
```

Note that the sample size to estimate the moments can be much larger (say, \sim 10^4) than the sample size to create the metamodel (say \sim 10^2). You can also plot the histogram of the metamodel prediction to see how the values distributed.

In the example PCE METAMODELING: ESTIMATION OF STATISTICAL MOMENTS, the moments are directly taken from the coefficients of the PCE metamodels created by increasing sample sizes.

In that example, the convergence plot that comes after is custom made (i.e., not via `uq_display`

), you can create the same for Kriging or PCK by replacing relevant code sections with the above procedure.

I hope this helps!

Hi Damar,

This answers my questions. Thank you so much for your inputs!

Because in my mind the metamodel helps to not burden computational cost for computing the statistical moments such as PCE which can be directly computed. So based on what you are saying here the Kriging and PCE kriging are not like that. It is because I have an issue with vectorizing my complex model, I do not where it went wrong, so having to evaluate the model for large sample size is going to be a huge computational cost. I will have to check again.

Thank you very much for your help!

Best regards,

Visha

Yes, PCE metamodels do have nice properties regarding moment estimation (among other things). However, once you have a Kriging or PC-Kriging metamodel the computational cost to compute a large number of sample points from the metamodel should be minor compared to running the full computational model (assuming your complex model is non-trivial to run). Furthermore, I think the evaluation of all metamodels in UQLab is vectorized.

Dear Visha

As Damar said, UQLab evaluates the metamodel in a vectorized way. However, there may be rare cases where the best way to evaluate the metamodel is not obvious. For example, see this post:

If you explain you computational model in more detail, I can hopefully say more about that.

Best regards

Styfen

Hi all

I am Roberto from University of Trento. I am new to UQworld.

Regarding this discussion, the BraninHoo function provides the nice plots of mean and variance of the Gaussian process, that I’m attaching. The dimension of the input here is 2 so clearly such plot representation is possible, but it wouldn’t be for higher dimensions.

My question is how to obtain the same information for dimension of the input higher than 2 (e.g. my case is with 3)?

Thank you in advance

Roberto

Dear Roberto

You can obtain the mean and variance of your Kriging model at any point x as follows:

```
[Ymu,Yvar] = uq_evalModel(x)
```

Best regards

Styfen

Dear Styfen

Thank you so much. That’s what I needed.

Roberto