SensitivityBenchmarkMetaAlgorithm¶
- class SensitivityBenchmarkMetaAlgorithm(problem)¶
Methods
Get the available sample-based estimators.
runPolynomialChaosEstimator
([...])Estimate Sobol' sensitivity indices from sparse polynomial chaos.
runSamplingEstimator
(sample_size[, ...])Runs the sampling sensitivity estimator and get the results.
- __init__(problem)¶
Create a meta-algorithm to solve a sensitivity problem.
- Parameters:
- problemot.SensitivityBenchmarkProblem
The problem.
- static GetEstimators()¶
Get the available sample-based estimators.
This currently involves four estimators: * ot.SaltelliSensitivityAlgorithm * ot.MartinezSensitivityAlgorithm * ot.JansenSensitivityAlgorithm * ot.MauntzKucherenkoSensitivityAlgorithm
- Parameters:
- None.
- Returns:
- estimators_listlist of ot.SobolIndicesAlgorithm
The list of available sample-based Sobol’ indices estimators.
- runPolynomialChaosEstimator(sample_size_train=100, sample_size_test=100, total_degree=2, hyperbolic_quasinorm=0.5)¶
Estimate Sobol’ sensitivity indices from sparse polynomial chaos.
Uses regression to estimate the coefficients. Uses LARS to select the model. Uses hyperbolic enumerate rule. Uses Sobol’ low discrepancy sequence to train the polynomial. Uses Monte-Carlo sample to test the polynomial.
- Parameters:
- sample_size_trainint, optional
The training sample size. The default is 100.
- sample_size_testint, optional
The test sample size. The default is 100.
- total_degreeint, optional
The total polynomial degree. The default is 2.
- hyperbolic_quasinormfloat, optional
The hyperbolic quasi-norm. The default is 0.5.
- Returns:
- first_order: ot.Point(dimension)
The Sobol’ first order indices.
- total_order: ot.Point(dimension)
The Sobol’ total order indices.
- runSamplingEstimator(sample_size, estimator='Saltelli', sampling_method='MonteCarlo')¶
Runs the sampling sensitivity estimator and get the results.
We may let the user select the estimator by taking e.g. the SaltelliSensitivityAlgorithm() as input argument, and use setDesign(), but this currently fails: https://github.com/openturns/openturns/issues/1884 This is why the estimator input argument is currently a string.
- Parameters:
- sample_size: int
The sample size.
- estimatorstr
The estimator. Must be “Saltelli”, “Jansen”, “Martinez”, “MauntzKucherenko”, “Janon”.
- sampling_methodstr
The sampling method. Must be “MonteCarlo” or “LHS” or “QMC”.
- Returns:
- first_order: ot.Point(dimension)
The Sobol’ first order indices.
- total_order: ot.Point(dimension)
The Sobol’ total order indices.