Sensitivity analysis quantifies how changes in input parameters affect model outputs. The implementation uses variance-based SOBOL indices through the SALib library to identify which parameters most strongly influence your model predictions.Documentation Index
Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
Use this file to discover all available pages before exploring further.
Key Concepts
First-Order (S1)
Direct contribution of each parameter to output variance. An S1 of 0.3 means that parameter alone accounts for 30% of variance.
Total-Order (ST)
Direct effects plus all interaction effects involving that parameter. ST - S1 indicates interaction strength.
Second-Order (S2)
Pairwise interactions between parameters. Computationally expensive but reveals parameter coupling.
Basic Usage
After fitting a model, callsensitivity_analysis() on your DataFit object:
The usage and options shown here are not exhaustive. See the API reference for full details on sensitivity analysis and configuration.
Understanding Results
The method returns a dictionary with SOBOL indices:Interpretation Example
ForS1 = [0.65, 0.25] and ST = [0.72, 0.35]:
| Parameter | Direct Effect (S1) | Interaction Effect (ST - S1) | Total Effect (ST) |
|---|---|---|---|
| Parameter 1 | 65% | 7% | 72% |
| Parameter 2 | 25% | 10% | 35% |
- Unaccounted variance: 1 - sum(S1) = 10% from joint interactions
- Total effects sum > 1: Because interaction contributions involve both parameters
If ST ≈ 0 for a parameter, it has negligible influence on model outputs within the specified bounds. Consider fixing that parameter or checking if bounds are physically realistic.
Configuration Options
Sample Size
n_samples × (2 × n_params + 2) evaluations. Recommendations:
- Use powers of 2: 256, 512, 1024
- Larger values reduce confidence intervals but increase computation time
- Start with 256 for exploratory analysis
Custom Cost Function
Progress Tracking
Second-Order Indices
S2[i,j] quantifies the interaction between parameters i and j beyond their individual effects.
Practical Workflow
Initial Parameter Screening
Run with moderate sample size to identify important parameters:Parameters with ST < 0.05 are typically negligible.
Handling Failed Evaluations
If model evaluations fail for some parameter combinations:- Check parameter bounds for physical validity
- Verify model stability across the parameter space
- Consider tightening bounds around the fitted values
Log-Transform Option
If the cost landscape has an extremely large range, useapply_log_transform:
With log transform, the sensitivity analysis represents multiplicative changes in cost due to parameters, rather than additive changes.
Mathematical Background
SOBOL indices are variance-based measures that decompose the total output variance into contributions from individual parameters and their interactions. This approach treats the model as a black box and samples the entire parameter space, making it a global sensitivity method—in contrast to local methods like gradient-based sensitivity that only characterize behavior near a single point.Variance Decomposition
Consider a model where are independent input parameters. The total variance of the output can be decomposed as: where is the variance contribution from parameter alone, captures the interaction between parameters and , and so on for higher-order interactions.First-Order Index
The first-order index measures the direct contribution of parameter to the output variance, excluding any interactions: The notation means “all parameters except ”. The inner expectation averages over all other parameters while holding fixed. The outer variance then measures how much this conditional mean varies as changes. Interpretation: If , then 30% of the output variance is directly attributable to alone, without considering interactions.Total-Order Index
The total-order index captures both the direct effect of and all interactions involving : The difference quantifies how much of parameter ‘s influence comes through interactions with other parameters. Interpretation: If , the parameter has negligible influence on the output—even through interactions—and could potentially be fixed without loss of model fidelity.Second-Order Index
The second-order index isolates the interaction effect between parameters and : This subtracts the individual first-order effects to reveal only the joint contribution that cannot be attributed to either parameter alone. Interpretation: A large indicates that the effect of parameter depends on the value of parameter (and vice versa). This coupling may suggest physical dependencies or identifiability issues.Saltelli Estimators
Computing SOBOL indices requires evaluating high-dimensional integrals. The Saltelli sampling scheme provides efficient Monte Carlo estimators using two independent sample matrices and , each of size . For each parameter , a hybrid matrix is constructed by taking all columns from except column , which comes from . First-order index estimator: Total-order index estimator: This scheme requires model evaluations for first and total-order indices, where is the base sample size and is the number of parameters. The computational cost scales linearly with the number of parameters, making it tractable for moderate-dimensional problems.Comparison with Other Methods
| Method | Purpose | What it Characterizes |
|---|---|---|
| Sensitivity Analysis | Which parameters matter? | Parameter importance |
| Linear Confidence Intervals | How precisely are parameters estimated? | Parameter uncertainty |
| MCMC Sampling | What are parameter distributions? | Full posterior distributions |
References
- Herman, J., & Usher, W. (2017). SALib: An open-source Python library for Sensitivity Analysis. Journal of Open Source Software, 2(9), 97.
- Saltelli, A., et al. (2010). Variance based sensitivity analysis of model output. Computer Physics Communications, 181(2), 259-270.