UQWorld

Sobol with UQLink

Hello, I have a UQLink-based model where I am running a Sobol Analysis, but it doesn’t stop at the designated sample size I give it. Instead, it keeps going without any sign of stopping.

For example, when I give it 10,000 samples, it keeps going after the target has been reached. Right now it’s still going way beyond without any indication of stopping.

Has anyone else every experienced this or have any idea why it might be doing this?

Hi @Anarionz, welcome to UQWorld!

Are you using a Monte Carlo simulation to estimate the Sobol’ indices? (this is the default)

If you are, then the total number of actual model runs is not the number of samples you specified (that refers to the number of independent MC sample points); it also depends on the number of input parameters. The total number of model runs to estimate the first-order and total Sobol’ indices is N \times (M+2) where N and M are the numbers of MC sample points and input parameters, respectively.

There’s a bit more explanation here on what kind of sample is generated for that estimation:

BTW, are you monitoring the number of model runs by looking at the files created by UQLink?

Hope this answers your question.

Thank you for the reply @damarginal.

I have a case where I have a total of 17 independent manufacturing input parameters to an engineered system, plus 2 parameters that account for large, important trends in operating history. This gives me a total of M = 19.

Each of these parameters are to the best of my knowledge, independent of one another.

I was originally running the SOBOL analysis with N = 10000, so no wonder it was taking SO long… It actually required 210000 “realizations.”

So after reading your feedback, I’ve run the SOBOL analysis again, with N = 200, and N = 500 but I end up getting an error which looks as follows:


something went extremely wrong while trying to evaluate the analysis
You may find additional information in the catched exeption:
Improper assignment with rectangular empty
matrix.

Error in uq_sobol_indices (line 163)
TotalSobolIndices(oo, : ) = tsindex;

Error in uq_sensitivity (line 83)
results =
uq_sobol_indices(CurrentAnalysis);

Error in uq_initialize_uq_sensitivity (line 861)
uq_runAnalysis(current_analysis);

Error in AUTO_EAE_UQ_Improved_SLURM_v3 (line 346)
SobolAnalysis = uq_createAnalysis(SobolOpts);


Before I carry on and try a much larger size of N, could you please let me know what you think regarding whether the above error occurred simply because of the low number of N I’ve tried re-running the problem with (such that the problem didn’t converge)? Or do you think there is a different fundamental issue?

Thank you!

Hi @Anarionz,

One way this can occur is if your model evaluation somehow gives NaN as values for any input points in the experimental design used to estimate the indices. It’s a bit difficult to know more from your current description.

Before you conduct your Sobol’ analysis, have you checked that you have indeed established a proper connection between UQLab and your model with UQLink?

Say you have myModel and myInput for your UQLink-based model and your probabilistic input model, respectively. What would the following code give you?

X = uq_getSample(myInput,200);  % Use smaller sample size if your code takes too long to execute
Y = uq_evalSample(myModel,X);

This would be the first step to indicate that.

How long does it take to run a single simulation of your model, by the way?