approximate_polynomial_chaos

pyapprox.approximate.approximate_polynomial_chaos(train_samples, train_vals, verbosity=0, basis_type='expanding_basis', variable=None, options=None)[source]

Compute a Polynomial Chaos Expansion of a function from a fixed data set.

Parameters
train_samplesnp.ndarray (nvars,nsamples)

The inputs of the function used to train the approximation

train_valsnp.ndarray (nvars,nsamples)

The values of the function at train_samples

basis_typestring

Type of approximation. Should be one of

variablepya.IndependentMultivariateRandomVariable

Object containing information of the joint density of the inputs z. This is used to generate random samples from this join density

verbosityinteger

Controls the amount of information printed to screen

Returns
resultpyapprox.approximate.ApproximateResult

Result object. For more details see