SobolIndicesAlgorithm¶

class
SobolIndicesAlgorithm
(*args)¶ Sensitivity analysis.
Notes
This method is concerned with analyzing the influence the random vector has on a random variable which is being studied for uncertainty (see also [Sobol1993]).
Here we attempt to evaluate the part of variance of due to the different components .
We denote G the physical model such as . Let us consider first the case where is of dimension 1.
The objective here is to develop the variability of the random variable as function of . Using the Hoeffding decomposition, we got:
where :
and . Using the previous decomposition, it follows that sensitivity indices are defined as follow:
are the first order sensitivity indices and measure the impact of in the variance , are the second order sensitivity indices and measure the impact of the interaction of and in the variance .
When , we use total sensitivity indices , which is defined as the sum of all indices that count the ith variable:
where is the part of variance of that do not countain the ith variable.
In practice, to estimate these quantities, Sobol proposes to use numerical methods that rely on the two independent realizations of the random vector . If we consider A and B two independent samples (of size n) of the previous random vector:
Each line is a realization of the random vector. The purpose is to mix these two samples to get an estimate of the sensitivities.
Sobol method require respectively and sample designs for the evaluation of first order (respectively second order) sensitivity indices. These are defined as hereafter:
It follows that and terms are defined as follow:
The implemented second order indices use this formula.
The major methods (Saltelli, Jansen, MauntzKucherenko, Martinez) use the matrix to compute the indices (first order and total order). This matrix is defined as follows:
 The formulas for the evaluation of the indices are given in each class documentation:
SaltelliSensitivityAlgorithm
for the Saltelli method,JansenSensitivityAlgorithm
for the Jansen method,MauntzKucherenkoSensitivityAlgorithm
for the MauntzKucherenko method,MartinezSensitivityAlgorithm
for the Martinez method
For multivariate outputs (see [Gamboa2013]), aggregate indices can be computed thanks to the getAggregatedFirstOrderIndices and getAggregatedTotalOrderIndices. Such indices write as follow:
Aggregated second order indices have not been implemented.
Note finally that evaluation of intervals for indices might be done for first and total order thanks to the getFirstOrderIndicesInterval and getTotalOrderIndicesInterval methods. Default bootstrap size and confidence level values are parametrized thanks to the resource map keys SobolIndicesAlgorithmBootstrapSize and SobolIndicesAlgorithmBootstrapConfidenceLevel. Appropriate setters might be called to change their values.
Also note that for numerical stability reasons the ouputs are centered before indices estimation:
Methods
draw
(*args)Draw sensitivity indices. getAggregatedFirstOrderIndices
()Get the evaluation of merged first order Sobol indices. getAggregatedTotalOrderIndices
()Get the evaluation of merged total order Sobol indices. getBootstrapConfidenceLevel
()Get the confidence interval level for bootstrap sampling. getBootstrapSize
()Get the number of bootstrap sampling size. getClassName
()Accessor to the object’s name. getFirstOrderIndices
([marginalIndex])Get first order Sobol indices. getFirstOrderIndicesInterval
()Get interval for the merged first order Sobol indices. getId
()Accessor to the object’s id. getImplementation
(*args)Accessor to the underlying implementation. getName
()Accessor to the object’s name. getSecondOrderIndices
([marginalIndex])Get second order Sobol indices. getTotalOrderIndices
([marginalIndex])Get total order Sobol indices. getTotalOrderIndicesInterval
()Get interval for the merged total order Sobol indices. setBootstrapConfidenceLevel
(confidenceLevel)Set the confidence interval level for bootstrap sampling. setBootstrapSize
(bootstrapSize)Set the number of bootstrap sampling size. setName
(name)Accessor to the object’s name. 
__init__
(*args)¶ x.__init__(…) initializes x; see help(type(x)) for signature

draw
(*args)¶ Draw sensitivity indices.
 Usage:
draw()
draw(marginalIndex)
With the first usage, draw the aggregated first and total order indices. With the second usage, draw the first and total order indices of a specific marginal in case of vectorial output
Parameters: marginalIndex: int
marginal of interest (case of second usage)
Returns: Graph :
Graph
A graph containing the aggregated first and total order indices.
Notes
If number of bootstrap sampling is not 0, and confidence level associated > 0, the graph includes confidence interval plots in the first usage.

getAggregatedFirstOrderIndices
()¶ Get the evaluation of merged first order Sobol indices.
Returns: indices :
Point
Sequence containing merged first order Sobol indices.

getAggregatedTotalOrderIndices
()¶ Get the evaluation of merged total order Sobol indices.
Returns: indices :
Point
Sequence containing merged total order Sobol indices.

getBootstrapConfidenceLevel
()¶ Get the confidence interval level for bootstrap sampling.
Returns: confidenceLevel : float
Confidence level for boostrap sampling

getBootstrapSize
()¶ Get the number of bootstrap sampling size.
Returns: bootstrapSize : int
Number of bootsrap sampling

getClassName
()¶ Accessor to the object’s name.
Returns: class_name : str
The object class name (object.__class__.__name__).

getFirstOrderIndices
(marginalIndex=0)¶ Get first order Sobol indices.
Parameters: i : int, optional
Index of the marginal of the function, equals to by default.
Returns: indices :
Point
Sequence containing first order Sobol indices.

getFirstOrderIndicesInterval
()¶ Get interval for the merged first order Sobol indices.
Returns: interval :
Interval
Interval for first order Sobol indices for each component.

getId
()¶ Accessor to the object’s id.
Returns: id : int
Internal unique identifier.

getImplementation
(*args)¶ Accessor to the underlying implementation.
Returns: impl : Implementation
The implementation class.

getName
()¶ Accessor to the object’s name.
Returns: name : str
The name of the object.

getSecondOrderIndices
(marginalIndex=0)¶ Get second order Sobol indices.
Parameters: i : int, optional
Index of the marginal of the function, equals to by default.
Returns: indices :
SymmetricMatrix
Tensor containing second order Sobol indices.

getTotalOrderIndices
(marginalIndex=0)¶ Get total order Sobol indices.
Parameters: i : int, optional
Index of the marginal of the function, equals to by default.
Returns: indices :
Point
Sequence containing total order Sobol indices.

getTotalOrderIndicesInterval
()¶ Get interval for the merged total order Sobol indices.
Returns: interval :
Interval
Interval for total order Sobol indices for each component.

setBootstrapConfidenceLevel
(confidenceLevel)¶ Set the confidence interval level for bootstrap sampling.
Parameters: confidenceLevel : float
Confidence level for boostrap sampling

setBootstrapSize
(bootstrapSize)¶ Set the number of bootstrap sampling size.
Default value is 0.
Parameters: bootstrapSize : int
Number of bootsrap sampling

setName
(name)¶ Accessor to the object’s name.
Parameters: name : str
The name of the object.