# SobolIndices¶

class SobolIndices(*args)

Sensitivity analysis based on Sobol’ indices.

Available constructor:

SobolIndices(POD, N)

Parameters
POD

The POD object where the run method has been performed.

Nint

Size of samples to generate

Returns
saopenturns.SobolIndicesAlgorithm

The openturns object that perform the sensitivity algorithm.

Notes

This class uses the openturns.SobolIndicesAlgorithm class of OpenTURNS. The sensitivity analysis can be performed only with a POD built with a Kriging metamodel or a polynomial chaos where the input dimension is greater than 3 (counting the defect).

When using Kriging, the POD at a given point is computed using the kriging mean and variance. For polynomial chaos, random coefficients are generated, the signal is computed for all coefficients and the POD is eventually estimated. The default simulation size is set to 1000. This value can be changed using setSimulationSize().

The sensitivity analysis allows to computed aggregated Sobol indices for the given range of defect sizes. The default defect sizes correspond with those defined in the POD object. It can be changed using setDefectSizes().

The four methods developed in OpenTURNS are availables and can be chosen thanks to setSensitivityMethod(). The default method is “Saltelli”.

The result of the sensitivity analysis is available using getSensitivityResult(). It returns the openturns sensitivity object from which the sensitivity values are given using proper methods.

Methods

 drawAggregatedIndices(self[, label, name]) Plot the aggregated Sobol indices. drawFirstOrderIndices(self[, label, name]) Plot the first Sobol indices for all defect values. drawTotalOrderIndices(self[, label, name]) Plot the total Sobol indices for all defect values. getDefectSizes(self) Accessor to the defect size where the POD is computed. Accessor to the parameters distribution. Accessor to the sensitivity method. Accessor to the OpenTURNS sensitivity object. Accessor to the simulation size when using polynomial chaos. run(self) Compute the Sobol indices with the chosen algorithm. setDefectSizes(self, size) Accessor to the defect size where the POD is computed. setDistribution(self, distribution) Accessor to the parameters distribution. setSensitivityMethod(self, method) Accessor to the sensitivity method. setSimulationSize(self, size) Accessor to the simulation size when using polynomial chaos.
drawAggregatedIndices(self, label=None, name=None)

Plot the aggregated Sobol indices.

Parameters
labelsequence of float

The name of the input parameters

namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

drawFirstOrderIndices(self, label=None, name=None)

Plot the first Sobol indices for all defect values.

Parameters
labelsequence of float

The name of the input parameters

namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

drawTotalOrderIndices(self, label=None, name=None)

Plot the total Sobol indices for all defect values.

Parameters
labelsequence of float

The name of the input parameters

namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

getDefectSizes(self)

Accessor to the defect size where the POD is computed.

Returns
defectSizesequence of float

The defect sizes where the Monte Carlo simulation is performed to compute the POD.

getDistribution(self)

Accessor to the parameters distribution.

Returns
distributionopenturns.ComposedDistribution

The input parameters distribution used for the Monte Carlo simulation. Default is a Uniform distribution for all parameters.

getSensitivityMethod(self)

Accessor to the sensitivity method.

Returns
methodstr

The sensitivity method.

getSensitivityResult(self)

Accessor to the OpenTURNS sensitivity object.

Returns
saopenturns.SobolIndicesAlgorithm
getSimulationSize(self)

Accessor to the simulation size when using polynomial chaos.

Returns
sizeint

The size of the simulation used to compute POD at a given point.

run(self)

Compute the Sobol indices with the chosen algorithm.

setDefectSizes(self, size)

Accessor to the defect size where the POD is computed.

Parameters
defectSizesequence of float

The defect sizes where the Monte Carlo simulation is performed to compute the POD.

setDistribution(self, distribution)

Accessor to the parameters distribution.

Parameters
distributionopenturns.ComposedDistribution

The input parameters distribution used for the Monte Carlo simulation.

setSensitivityMethod(self, method)

Accessor to the sensitivity method.

Parameters
methodstr

The sensitivity method: either “Saltelli”, “Martinez”, “Jansen” or “MauntzKucherenko”. Default is “Saltelli”.

setSimulationSize(self, size)

Accessor to the simulation size when using polynomial chaos.

Parameters
sizeint

The size of the simulation used to compute at a given point. Default is 1000.