SobolIndices¶
- class SobolIndices(*args)¶
Sensitivity analysis based on Sobol’ indices.
Available constructor:
SobolIndices(POD, N)
- Parameters:
- POD
KrigingPOD
,AdaptiveSignalPOD
orPolynomialChaosPOD
The POD object where the run method has been performed.
- Nint
Size of samples to generate
- POD
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.
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
()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.
- Returns:
- sa
openturns.SobolIndicesAlgorithm
The openturns object that perform the sensitivity algorithm.
- sa
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.- drawAggregatedIndices(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(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(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()¶
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()¶
Accessor to the parameters distribution.
- Returns:
- distribution
openturns.JointDistribution
The input parameters distribution used for the Monte Carlo simulation. Default is a Uniform distribution for all parameters.
- distribution
- getSensitivityMethod()¶
Accessor to the sensitivity method.
- Returns:
- methodstr
The sensitivity method.
- getSensitivityResult()¶
Accessor to the OpenTURNS sensitivity object.
- Returns:
- getSimulationSize()¶
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()¶
Compute the Sobol indices with the chosen algorithm.
- setDefectSizes(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(distribution)¶
Accessor to the parameters distribution.
- Parameters:
- distribution
openturns.JointDistribution
The input parameters distribution used for the Monte Carlo simulation.
- distribution
- setSensitivityMethod(method)¶
Accessor to the sensitivity method.
- Parameters:
- methodstr
The sensitivity method: either “Saltelli”, “Martinez”, “Jansen” or “MauntzKucherenko”. Default is “Saltelli”.
- setSimulationSize(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.