SobolIndices

class SobolIndices(*args)

Sensitivity analysis based on Sobol’ indices.

Available constructor:

SobolIndices(POD, N)

Parameters:

POD : KrigingPOD, AdaptiveSignalPOD or PolynomialChaosPOD

The POD object where the run method has been performed.

N : int

Size of samples to generate

Returns:

sa : openturns.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([label, name]) Plot the aggregated Sobol indices.
drawFirstOrderIndices([label, name]) Plot the first Sobol indices for all defect values.
drawTotalOrderIndices([label, name]) Plot the total Sobol indices for all defect values.
getDefectSizes() Accessor to the defect size where the POD is computed.
getDistribution() Accessor to the parameters distribution.
getSensitivityMethod() Accessor to the sensitivity method.
getSensitivityResult() Accessor to the OpenTURNS sensitivity object.
getSimulationSize() Accessor to the simulation size when using polynomial chaos.
run() Compute the Sobol indices with the chosen algorithm.
setDefectSizes(size) Accessor to the defect size where the POD is computed.
setDistribution(distribution) Accessor to the parameters distribution.
setSensitivityMethod(method) Accessor to the sensitivity method.
setSimulationSize(size) Accessor to the simulation size when using polynomial chaos.
drawAggregatedIndices(label=None, name=None)

Plot the aggregated Sobol indices.

Parameters:

label : sequence of float

The name of the input parameters

name : string

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:

fig : matplotlib.figure

Matplotlib figure object.

ax : matplotlib.axes

Matplotlib axes object.

drawFirstOrderIndices(label=None, name=None)

Plot the first Sobol indices for all defect values.

Parameters:

label : sequence of float

The name of the input parameters

name : string

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:

fig : matplotlib.figure

Matplotlib figure object.

ax : matplotlib.axes

Matplotlib axes object.

drawTotalOrderIndices(label=None, name=None)

Plot the total Sobol indices for all defect values.

Parameters:

label : sequence of float

The name of the input parameters

name : string

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:

fig : matplotlib.figure

Matplotlib figure object.

ax : matplotlib.axes

Matplotlib axes object.

getDefectSizes()

Accessor to the defect size where the POD is computed.

Returns:

defectSize : sequence of float

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

getDistribution()

Accessor to the parameters distribution.

Returns:

distribution : openturns.ComposedDistribution

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

getSensitivityMethod()

Accessor to the sensitivity method.

Returns:

method : str

The sensitivity method.

getSensitivityResult()

Accessor to the OpenTURNS sensitivity object.

Returns:sa : openturns.SobolIndicesAlgorithm
getSimulationSize()

Accessor to the simulation size when using polynomial chaos.

Returns:

size : int

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

run()

Compute the Sobol indices with the chosen algorithm.

setDefectSizes(size)

Accessor to the defect size where the POD is computed.

Parameters:

defectSize : sequence of float

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

setDistribution(distribution)

Accessor to the parameters distribution.

Parameters:

distribution : openturns.ComposedDistribution

The input parameters distribution used for the Monte Carlo simulation.

setSensitivityMethod(method)

Accessor to the sensitivity method.

Parameters:

method : str

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

setSimulationSize(size)

Accessor to the simulation size when using polynomial chaos.

Parameters:

size : int

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