expanding_basis_omp_pce

pyapprox.approximate.expanding_basis_omp_pce(pce, train_samples, train_vals, hcross_strength=1, verbosity=1, max_num_terms=None, solver_type='lasso_lars', cv=10, restriction_tol=4.440892098500626e-16)[source]

Iteratively expand and restrict the polynomial basis and use cross validation to find the best basis [JESJCP2015]

Parameters
train_samplesnp.ndarray (nvars,nsamples)

The inputs of the function used to train the approximation

train_valsnp.ndarray (nvars,nqoi)

The values of the function at train_samples

hcross_strengthfloat

The strength of the hyperbolic cross index set. hcross_strength must be in (0,1]. A value of 1 produces total degree polynomials

cvinteger

The number of cross validation folds used to compute the cross validation error

solver_typestring

The type of regression used to train the polynomial

  • ‘lasso_lars’

  • ‘lars’

  • ‘lasso’

  • ‘omp’

verbosityinteger

Controls the amount of information printed to screen

restriction_tolfloat

The tolerance used to prune inactive indices

Returns
resultpyapprox.approximate.ApproximateResult

Result object with the following attributes

approxpyapprox.multivariate_polynomials.PolynomialChaosExpansion

The PCE approximation

scoresnp.ndarray (nqoi)

The best cross validation score for each QoI

References

JESJCP2015

J.D. Jakeman, M.S. Eldred, and K. Sargsyan. Enhancing l1-minimization estimates of polynomial chaos expansions using basis selection. Journal of Computational Physics, 289(0):18 – 34, 2015