uprop

Module for uncertainty propagation workflows via polynomial chaos.

Functions

uprop_proj(in_pc, model, nqd, out_pc)

Uncertainty propagation via spectral projection.

uprop_regr(in_pc, model, nsam, out_pc)

Uncertainty propagation via regression.

Module Contents

pytuq.workflows.uprop.uprop_proj(in_pc, model, nqd, out_pc)[source]

Uncertainty propagation via spectral projection.

Evaluates the model on quadrature points induced by the input PC germ, and computes the output PC coefficients via Galerkin projection.

Parameters:
  • in_pc (PCRV) – Input PC random variable.

  • model (callable) – Model function taking an \((N, d)\)-sized array and returning an \((N, o)\)-sized array.

  • nqd (int) – Number of quadrature points per stochastic dimension.

  • out_pc (PCRV) – Output PC random variable (coefficients are set in-place).

pytuq.workflows.uprop.uprop_regr(in_pc, model, nsam, out_pc)[source]

Uncertainty propagation via regression.

Evaluates the model on random germ samples from the input PC and computes the output PC coefficients via least-squares regression.

Parameters:
  • in_pc (PCRV) – Input PC random variable.

  • model (callable) – Model function taking an \((N, d)\)-sized array and returning an \((N, o)\)-sized array.

  • nsam (int) – Number of random samples.

  • out_pc (PCRV) – Output PC random variable (coefficients are set in-place).