analyze_sensitivity_sparse_grid

pyapprox.sensitivity_analysis.analyze_sensitivity_sparse_grid(sparse_grid, max_order=2)[source]

Compute sensitivity indices from a sparse grid by converting it to a polynomial chaos expansion

Parameters
sparse_grid :class:`pyapprox.adaptive_sparse_grid:CombinationSparseGrid`

The sparse grid

max_orderinteger

The maximum interaction order of Sonol indices to compute. A value of 2 will compute all pairwise interactions, a value of 3 will compute indices for all interactions involving 3 variables. The number of indices returned will be nchoosek(nvars+max_order,nvars). Warning when nvars is high the number of indices will increase rapidly with max_order.

Returns
resultpyapprox.sensitivity_analysis.SensivitityResult

Result object with the following attributes

main_effectsnp.ndarray (nvars)

The variance based main effect sensitivity indices

total_effectsnp.ndarray (nvars)

The variance based total effect sensitivity indices

sobol_indicesnp.ndarray (nchoosek(nvars+max_order,nvars),nqoi)

The variance based Sobol sensitivity indices

sobol_interaction_indicesnp.ndarray(nvars,nchoosek(nvars+max_order,nvars))

Indices specifying the variables in each interaction in sobol_indices

pcemultivariate_polynomials.PolynomialChaosExpansion

The pce respresentation of the sparse grid approx