Saltelli Sampling
Saltelli sampling is a method to draw samples for the purpose of Sobol’
sensitvity analysis (variance-based sensitivity analysis). Detailed description
of the theory can be found in Saltelli [2002] and Saltelli et al. [2010].
The Saltelli
class relies on the Python package SALib [Herman and Usher, 2017].
Saltelli Class
The Saltelli
class is imported by:
from psimpy.sampler.saltelli import Saltelli
Methods
- class Saltelli(ndim, bounds=None, calc_second_order=True, skip_values=None)[source]
Saltelli’s version of Sobol’ sampling.
- Parameters
ndim (int) – Dimension of parameters.
bounds (numpy array, optional) – Upper and lower boundaries of each parameter. Shape
(ndim, 2)
. bounds[:, 0] corresponds to lower boundaries of each parameter and bounds[:, 1] to upper boundaries of each parameter.calc_second_order (bool, optional) – If True, calculate second-order Sobol’ indices. If False, second-order Sobol’ indices are not computed.
skip_values (int, optional) – Number of points to skip in the Sobol’ sequence. It should be ideally a value of base \(2\).
- sample(nbase)[source]
Draw samples using Saltelli’s extension of the Sobol’ sequence.
- Parameters
nbase (int) – Number of base samples. Correspond to the parameter
N
ofSALib.sample.saltelli.sample()
.- Returns
samples – Shape of
(nbase*(2*ndim+2), ndim)
ifcalc_second_order
is True. Shape of(nbase*(ndim+2), ndim)
ifcalc_second_order
is False.- Return type
numpy array