Choosing a method
jaxgsa provides thirteen global sensitivity analysis methods. Choose one by the question you want to answer, the data you have, and the model evaluations you can afford.
If this is your first analysis, start with Sobol when you can run the model at new points. Start with a given-data method when the model runs already exist. For definitions of the reported quantities, read GSA concepts.
Decide in three questions
1. Can you run the model at new points?
Four methods build a dedicated design: Sobol, eFAST, Morris, and Kucherenko. They require model evaluations at the points returned by sample().
The other nine methods use ordinary input samples. Pass the input matrix X and model output Y to analyze(). DGSM also takes the model itself so it can compute derivatives, but it does not require a dedicated design.
2. What should the result mean?
| Goal | Use | Result |
|---|---|---|
| Attribute output variance | Sobol, eFAST, PCE, HDMR | First-, total-, or higher-order variance contributions |
| Allocate variance to one number per parameter | Shapley | Shares that sum to one |
| Screen many parameters cheaply | Morris, DGSM | Elementary effects or derivative-based bounds |
| Measure changes to the full output distribution | PAWN, Borgonovo, optimal transport | CDF, density, or transport distances |
| Test general dependence | HSIC | Dependence indices and permutation p-values |
| Separate effects under dependent inputs | Kucherenko, VKOGA, HDMR | Conditional-variance or ANCOVA quantities |
These results are not interchangeable. A Morris score is not a variance fraction, and a distributional distance need not rank parameters like a Sobol index. Choose the quantity before comparing the numbers.
3. What is the evaluation budget?
- Sobol uses
model runs for first- and total-order indices, or when second-order indices are requested. - Morris uses
runs, where is the number of trajectories. - Kucherenko uses
runs. - eFAST uses one search curve per parameter; its minimum design grows quadratically with the number of parameters.
- Given-data methods require no new model evaluations, although their analysis time and memory requirements differ.
- DGSM evaluates model Jacobians. Its cost depends on the input and output dimensions and the automatic-differentiation direction.
Here
Common choices
Start with Sobol
Use Sobol when the inputs are independent, you can choose the evaluation points, and you want first-order, total-order, or pairwise interaction indices. It is the most direct general-purpose variance decomposition in the package.
import jaxgsa
from jaxgsa.benchmarks.ishigami import PROBLEM, evaluate
samples = jaxgsa.sobol.sample(PROBLEM, 8192, seed=0)
Y = evaluate(samples.samples)
result = jaxgsa.sobol.analyze(samples, Y)
print(result.S1)
print(result.ST)Read the Sobol API for estimator choices, confidence intervals, and second-order indices. See the basic example for a full workflow.
Screen before a costly analysis
Use Morris when model evaluations dominate the budget. Use DGSM when the model is written in JAX and its derivatives are meaningful. Both methods are most useful for identifying parameters that have little influence; neither reports the same quantity as a Sobol index.
After screening, fix negligible parameters and run a variance-based analysis on the remaining set. The screen-first workflow shows this sequence.
When you already have data
Choose by the result you need:
- PCE returns variance indices and a reusable polynomial surrogate.
- HDMR returns component-wise variance contributions and a reusable spline surrogate.
- Shapley returns one variance allocation per parameter.
- VKOGA returns dependent-input variance quantities through a kernel surrogate.
- PAWN, Borgonovo, and optimal transport compare output distributions rather than variance alone.
- HSIC measures dependence and supplies permutation p-values.
- DGSM evaluates derivatives of a JAX model at ordinary sample points.
Surrogate-based indices are only as reliable as the fitted surrogate. Check the fit diagnostics before interpreting PCE, HDMR, VKOGA, or Shapley results.
When inputs are dependent
There is no single extension of Sobol indices to dependent inputs. Kucherenko, VKOGA, HDMR, and the HDMR-backed Shapley route answer different questions. Distribution-based methods accept dependence but include both direct and correlation-borne influence in their scores.
Use Sensitivity with dependent inputs to choose among these definitions. Do not compare their values directly with classical Sobol indices for independent inputs.
When inputs are categorical
Sobol, PAWN, Borgonovo, and optimal transport accept unordered categorical parameters. The other methods refuse them because their results would depend on the arbitrary numeric coding of the levels.
See Categorical inputs for a worked comparison.
When you need gradients through the analysis
Most methods expose a pure indices() computation that can participate in JAX transformations. This is different from DGSM, which differentiates the model to define its sensitivity measure.
Support varies by method and transformation. Read Differentiating sensitivity analyses before building an end-to-end differentiable workflow.
Compare the methods
Direct variance methods
| Method | Choose it when | Main trade-off |
|---|---|---|
| Sobol | You want | Requires a Saltelli design |
| eFAST | You want | Design size grows quickly with |
| Kucherenko | You can run a dedicated design under declared input dependence | Indices have dependence-specific interpretations |
Surrogate variance and allocation methods
| Method | Choose it when | Main trade-off |
|---|---|---|
| PCE | A polynomial surrogate fits the response and you want | Expansion size grows with dimension and order |
| HDMR | You want component functions and an ANCOVA decomposition | Fit cost grows with interaction order |
| VKOGA | Inputs are dependent and you want several conditional-variance quantities | Results depend on a kernel surrogate |
| Shapley | You want one allocation per parameter that sums to one | Allocation depends on the PCE or HDMR fit |
Screening and bounds
| Method | Choose it when | Main trade-off |
|---|---|---|
| Morris | You need a low-cost first pass over many parameters | Reports screening statistics, not variance fractions |
| DGSM | The JAX model is differentiable and derivative-based bounds are useful | Bounds may be loose; long outputs increase Jacobian cost |
Distribution and dependence measures
| Method | Choose it when | Main trade-off |
|---|---|---|
| HSIC | You want a general dependence measure and permutation test | Kernel and permutation cost grow with sample size |
| PAWN | You want a CDF-based measure | Conditional binning introduces a tuning choice |
| Borgonovo | You want a density-based measure of distributional change | Conditional density estimation needs enough data |
| Optimal transport | You want mean-shift and shape-change contributions or a joint trajectory score | Transport solves cost more than simple univariate statistics |
Method capabilities
This is the canonical compatibility table. “Own design” means the method provides sample() and must evaluate the model on that design. A cross means the method refuses the declared input type rather than silently approximating it.
| Method | Reports | Own design | Correlated | Categorical | Bootstrap CI |
|---|---|---|---|---|---|
borgonovo | ✗ | ✓ § | ✓ | n_bootstrap | |
dgsm | bounds on | ✗ | ✗ | ✗ | n_bootstrap |
efast | ✓ | ✗ | ✗ | — | |
hdmr | ✗ | ✓ † | ✗ | n_bootstrap | |
hsic | dependence measure | ✗ | ✓ § | ✗ | — |
kucherenko | ✓ | ✓ | ✗ | n_bootstrap | |
morris | ✓ | ✗ | ✗ | n_bootstrap | |
optimal_transport | ✗ | ✓ § | ✓ | n_bootstrap | |
pawn | KS distance | ✗ | ✓ § | ✓ | n_bootstrap |
pce | ✗ | ✗ | ✗ | n_bootstrap | |
shapley | allocation summing to 1 | ✗ | ✗ ‡ | ✗ | n_bootstrap |
sobol | ✓ | ✗ | ✓ | n_bootstrap | |
vkoga | ✗ | ✓ | ✗ | n_bootstrap |
† HDMR accepts dependent inputs through its ANCOVA decomposition. Its
‡ The default PCE-backed Shapley analysis refuses dependent inputs. The HDMR backend accepts them, and include_correlative=True includes the ANCOVA correlative contribution in the allocation.
§ These measures include correlation-borne influence. A parameter may score above zero because it is correlated with a parameter used by the model.
All methods support scalar, multi-output, and time-series outputs. Eleven methods offer bootstrap confidence intervals through n_bootstrap; eFAST has no row-bootstrap interval, while HSIC reports permutation p-values. The API overview documents the shared result shape.
Most methods also accept irregular output grids: pass each channel as a (times, values) pair when channels do not share the same time coordinates. The analyzer buckets compatible channels without padding and preserves their coordinates in the returned result. See Irregular output grids for the supported-method matrix and limitations.
Where to go next
- Read GSA concepts to understand the reported quantities.
- Read Sensitivity with dependent inputs when the parameters are correlated.
- Read Scaling to large problems before committing a large evaluation budget.
- Open a method's API reference for its complete signature and estimator details.
- Browse the examples for complete analyses and output.