PolynomialChaosExpansion

class pyapprox.surrogates.PolynomialChaosExpansion[source]

Bases: object

A polynomial chaos expansion for independent random variables.

Methods Summary

__call__(samples[, return_grad])

Call self as a function.

basis_matrix(samples[, opts])

canonical_basis_matrix(canonical_samples[, opts])

configure(opts)

Parameters:

covariance()

Compute the covariance between each quantity of interest of the polynomial chaos expansion

get_coefficients()

get_indices()

jacobian(sample)

mean()

Compute the mean of the polynomial chaos expansion

num_terms()

num_vars()

set_coefficients(coefficients)

set_indices(indices)

update_recursion_coefficients(num_coefs_per_var)

value(samples)

variance()

Compute the variance of the polynomial chaos expansion

Methods Documentation

__call__(samples, return_grad=False)[source]

Call self as a function.

basis_matrix(samples, opts={})[source]
canonical_basis_matrix(canonical_samples, opts={})[source]
configure(opts)[source]
Parameters:
var_transpyapprox.variables.transforms.AffineTransform

Variable transformation mapping user samples into the canonical domain of the polynomial basis

optsdictionary

Options defining the configuration of the polynomial chaos expansion basis with the following attributes

poly_optsdictionary

Options to configure each unique univariate polynomial basis with attibutes

var_numsiterable

List of variables dimension which use the ith unique basis

The remaining options are specific to a given basis type. See
  • pyapprox.surrogates.orthopoly.quadrature.get_recursion_coefficients_from_variable()

covariance()[source]

Compute the covariance between each quantity of interest of the polynomial chaos expansion

Returns:
covarnp.ndarray (nqoi)

The covariance between each quantitity of interest

get_coefficients()[source]
get_indices()[source]
jacobian(sample)[source]
mean()[source]

Compute the mean of the polynomial chaos expansion

Returns:
meannp.ndarray (nqoi)

The mean of each quantitity of interest

num_terms()[source]
num_vars()[source]
set_coefficients(coefficients)[source]
set_indices(indices)[source]
update_recursion_coefficients(num_coefs_per_var)[source]
value(samples)[source]
variance()[source]

Compute the variance of the polynomial chaos expansion

Returns:
varnp.ndarray (nqoi)

The variance of each quantitity of interest