3.3.1.1. Case of singular correlation matrix

In the case where the correlation matrix injected (at once or component by component) happen to be singular, the default method used to correlate variables will failed and complains in this way (taking the TBasicSampling as an example):

<URANIE::ERROR>
<URANIE::ERROR> *** URANIE ERROR ***
<URANIE::ERROR> *** File[${SOURCEDIR}/meTIER/sampler/souRCE/TBasicSampling.cxx] Line[427]
<URANIE::ERROR> TBasicSampling::generateCorrSample: the cholesky decomposition of the user correlation matrix is not good.
<URANIE::ERROR>  Maybe you can try with SVD decomposition.
<URANIE::ERROR> *** END of URANIE ERROR ***
<URANIE::ERROR>

There is a workaround, provided by Uranie and heavily discussed in [Bla17]. The idea in a nutshell is to remplace the Cholesky operation by a SVD one, to decompose the target correlation matrix. This can be done adding “svd” in the Option_t *option field of either the constructor of the class or the generator method call. Here is an example for the TBasicSampling class:

tbs = Sampler.TBasicSampling(tds, "lhs;svd", 100)  # example at constructor
# .. or ..
tbs.generateCorrSample("svd")  # example with generator function call

Here comes its equivalent piece of code for the TSampling class:

ts = Sampler.TSampling(tds, "lhs;svd", 100)  # example at constructor
# .. or ..
ts.generateSample("svd")  # example with generator function call

In both cases, the use of this workaround should print this message to warn you about this.

<URANIE::INFO> 
<URANIE::INFO> *** URANIE INFORMATION ***
<URANIE::INFO> *** File[${SOURCEDIR}/meTIER/sampler/souRCE/TBasicSampling.cxx] Line[371]
<URANIE::INFO> TBasicSampling::generateCorrSample: you've asked to use SVD instead of Cholesky to decompose the correlation matrix. 
<URANIE::INFO> *** END of URANIE INFORMATION ***
<URANIE::INFO>

An example of how to use this in real condition (with a proper singular correlation matrix) is shown in Macro “samplingSingularCorrelationCase.py”.