Skip to content

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? ​

GoalUseResult
Attribute output varianceSobol, eFAST, PCE, HDMRFirst-, total-, or higher-order variance contributions
Allocate variance to one number per parameterShapleyShares that sum to one
Screen many parameters cheaplyMorris, DGSMElementary effects or derivative-based bounds
Measure changes to the full output distributionPAWN, Borgonovo, optimal transportCDF, density, or transport distances
Test general dependenceHSICDependence indices and permutation p-values
Separate effects under dependent inputsKucherenko, VKOGA, HDMRConditional-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 N(D+2) model runs for first- and total-order indices, or N(2D+2) when second-order indices are requested.
  • Morris uses r(D+1) runs, where r is the number of trajectories.
  • Kucherenko uses N(2D+1) 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 D is the number of parameters and N is a method-specific base sample count. For high-dimensional planning, see Scaling to large problems.

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.

python
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 ​

MethodChoose it whenMain trade-off
SobolYou want S1, ST, and optional S2 for independent inputsRequires a Saltelli design
eFASTYou want S1 and ST from Fourier search curvesDesign size grows quickly with D
KucherenkoYou can run a dedicated design under declared input dependenceIndices have dependence-specific interpretations

Surrogate variance and allocation methods ​

MethodChoose it whenMain trade-off
PCEA polynomial surrogate fits the response and you want S1, ST, or S2Expansion size grows with dimension and order
HDMRYou want component functions and an ANCOVA decompositionFit cost grows with interaction order
VKOGAInputs are dependent and you want several conditional-variance quantitiesResults depend on a kernel surrogate
ShapleyYou want one allocation per parameter that sums to oneAllocation depends on the PCE or HDMR fit

Screening and bounds ​

MethodChoose it whenMain trade-off
MorrisYou need a low-cost first pass over many parametersReports screening statistics, not variance fractions
DGSMThe JAX model is differentiable and derivative-based bounds are usefulBounds may be loose; long outputs increase Jacobian cost

Distribution and dependence measures ​

MethodChoose it whenMain trade-off
HSICYou want a general dependence measure and permutation testKernel and permutation cost grow with sample size
PAWNYou want a CDF-based measureConditional binning introduces a tuning choice
BorgonovoYou want a density-based measure of distributional changeConditional density estimation needs enough data
Optimal transportYou want mean-shift and shape-change contributions or a joint trajectory scoreTransport 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.

MethodReportsOwn designCorrelatedCategoricalBootstrap CI
borgonovoδ, S1✗✓ §✓n_bootstrap
dgsmbounds on ST✗✗✗n_bootstrap
efastS1, ST✓✗✗—
hdmrSa / Sb / S per term, surrogate✗✓ †✗n_bootstrap
hsicdependence measure✗✓ §✗—
kucherenkoS1, ST under dependence✓✓✗n_bootstrap
morrisμ∗, σ✓✗✗n_bootstrap
optimal_transportW22 index, advective + diffusive✗✓ §✓n_bootstrap
pawnKS distance✗✓ §✓n_bootstrap
pceS1, S2, ST, surrogate✗✗✗n_bootstrap
shapleyallocation summing to 1✗✗ ‡✗n_bootstrap
sobolS1, S2, ST✓✗✓n_bootstrap
vkogaSTC, STU, SU, SC, SIU, surrogate✗✓✗n_bootstrap

† HDMR accepts dependent inputs through its ANCOVA decomposition. Its ST is not a classical total-effect index under dependence.

‡ 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 ​

Released under the BSD-3-Clause License.