compute_mean_and_variance_sparse_grid¶
-
pyapprox.quadrature.
compute_mean_and_variance_sparse_grid
(sparse_grid, max_order=2)[source]¶ Compute the mean and variance of a sparse_grid by converting it to a polynomial chaos expansion
- Parameters
- sparse_grid :class:`pyapprox.adaptive_sparse_grid:CombinationSparseGrid`
The sparse grid
- Returns
- result
pyapprox.quadrature.QuadratureResult
Result object with the following attributes
- meannp.ndarray (nqoi)
The mean of each quantitity of interest
- variancenp.ndarray (nqoi)
The variance of each quantitity of interest
- pce
multivariate_polynomials.PolynomialChaosExpansion
The pce respresentation of the sparse grid
approx
- result