Offline integration of screening analysis/uncertainty analysis/global sensitivity analysis in UQLab with function evaluation in external program

Hi there,

We were trying to perform screening analysis (Morris), uncertainty analysis (LHS), and global sensitivity analysis (Sobol’) with UQLab and model evaluation in a external program (non-Matlab)

As goal we would like to generate the set of input samples for the screening in UQLab, and perform the model evaluations externally (offline), by feeding those generated input factors to the model, computing the output, and subsequently feed the output to UQLab. The idea behind performing this externally and offline, would be to avoid the necessity to encapsulate our model in the UQLab function call, and hence avoid the necessity to integrate our model pipeline in the screening loop.
Is it possible to perform this decoupled approach in UQLab?

The same goes for performing uncertainty analysis with LHS and model evaluation in a external program.
Is it possible to generate a set of input samples for a LHS uncertainty analysis, and compute the model evaluations externally in offline mode? Or does the model evaluation have to be done necessarily encapsulated in the function evaluation in UQLab?

… and the same goes for a global sensitivity analysis : using the Sobol’ method (sorry for the redundancy :). Would it be possible this approach?

Thank you in advance for your reply,
Best regards,
Ricardo

Hi @rickmps,

Welcome to UQWorld!

I’ll try to answer your questions:

  1. About decoupling the uncertainty analysis: This would be straightforward. If you have defined your inputs as an INPUT object in UQLab, then you can generate an LHS sample from it easily. This sample is just a matrix with as many columns as your input parameters and with as many rows as the size of the sample. You can save this as a text file and use it to create the input (files?) of your model/code. Of course, you will be fully responsible for how to create such inputs, run your own code, and take the relevant outputs for analysis. With uncertainty propagation, there is not much else UQLab needs to do afterward anyway.
  2. About decoupling the sensitivity analysis (Morris/Sobol’): This would be more difficult in UQLab because both Morris and Sobol’ requires, respectively, a specific sampling plan that is integrated into the whole mechanism to compute the sensitivity measures (generate a sample, evaluate the model, compute sensitivity measures). There is currently no way to decouple this: everything is done in one pass. Even if you manage to get the sampling plan and run your code with it yourself, it is not easy to bring back the results to UQLab (i.e., feed the output to UQLab) so you can compute the Morris elementary effects or Sobol’ indices.

Have you considered using UQLink instead? Perhaps I don’t understand the offline part of your question or what is the major problem with encapsulating your model as a function call for UQLab.

UQLink creates an interface between other UQLab functionalities and your model/code. Your model remains an external part of UQLab, including its actual evaluation. UQLink just needs to know the template file of your input and a MATLAB function that parses the (raw) output of the model for the relevant numbers. Using these ingredients it will create a wrapper to external codes and make it available for UQLab as a function call, which implies automatic feeding the input factors to the model and the output back to UQLab.

Or perhaps you have considered or even tried it but run into a problem. Maybe the community can help :slight_smile:.