User Reference Guide
The following documents the high-level functions that a typical user will may want to use. Note there are many more lower-level functions that may be of interest to advanced users. See the function doc-strings within submodule files for documentation of such functions.
pyapprox.analysis Package
The pyapprox.analysis
module implements a number of popular tools for
model analysis.
Functions
Plot parameter sweeps of a function. |
|
|
Compute variance based sensitivity metrics from a polynomial chaos expansion |
|
Compute sensitivity indices from a sparse grid by converting it to a polynomial chaos expansion |
|
Compute sensitivity indices by constructing an adaptive polynomial chaos expansion. |
|
Plot the main effects in a pie chart showing relative size. |
|
Plot the total effects in a bar chart showing relative size. |
|
Plot sobol indices in a pie chart showing relative size. |
|
Compute sensitivity indices for a model. |
|
pyapprox.bayes Package
The pyapprox.bayes
module implements a number of popular tools for
Bayesian Inference.
Functions
Compute the mean and covariance of the Laplace posterior of a linear model with a Gaussian prior |
Classes
|
A Bayesian network of linear Gaussian models. |
pyapprox.benchmarks Package
The pyapprox.benchmarks
module implements numerous benchmarks from
the modeling literature.
Functions
|
Setup the Ishigami function benchmark |
|
Setup the Sobol-G function benchmark |
Setup the Oakely function benchmark |
|
|
Setup one of the six Genz integration benchmarks \(f_d(x):\mathbb{R}^D\to\mathbb{R}\), where \(x=[x_1,\ldots,x_D]^\top\). |
|
Setup the Rosenbrock function benchmark |
|
Setup a PyApprox benchmark. |
|
|
Setup the wing weight model benchmark. |
|
|
Return an ensemble of 5 univariate models of the form |
List the names of all available benchmarks |
|
A benchmark for testing maximum likelihood estimation and Bayesian inference algorithms that involves learning the uncertain parameters \(\rv\) from synthteically generated observational data using the model |
|
This benchmark is used to test methods for forward propagation of uncertainty. |
Classes
Contains functions and results needed to implement known benchmarks. |
pyapprox.expdesign Package
The pyapprox.expdesign
module implements a number of popular tools
for designing experiments
Functions
|
Generate a multivariate Sobol sequence |
|
Generate a multivariate Halton sequence |
|
Compute optimal experimental designs for models of the form |
|
Initialize a Bayesian OED optimizer. |
Classes
|
Construct optimal experimental designs using functions of the fisher information matrix |
|
Construct minimax optimal experimental designs of non-linear models by sampling fisher information matrix at multiple uncertain parameter realizations. |
|
Compute open-loop OED my maximizing KL divergence between the prior and posterior. |
|
Compute open-loop OED by minimizing the deviation on the push forward of the posterior through a QoI model. |
|
Compute sequential optimal experimental designs that collect data and use this to inform the choice of subsequent design locations. |
|
Compute closed-loop OED my maximizing KL divergence between the prior and posterior. |
|
Compute closed-loop OED by minimizing the deviation on the push forward of the posterior through a QoI model. |
|
Base Bayesian OED class |
pyapprox.interface Package
The pyapprox.interface
module implements a number of tools for
interfacing with numerical models
Functions
|
Evaluate a function at a set of samples using a function that only takes one sample at a time |
Classes
|
Keep track of the wall time needed to evaluate a function. |
|
Return the wall-time needed to evaluate a function at each sample as an additional quantity of interest. |
|
Wrapper class to allow easy one-dimensional indexing of models in an ensemble. |
|
Evaluate a function at multiple samples in parallel using multiprocessing.Pool |
|
Evaluate a model in parallel when model instances are invoked by a shell script. |
|
Evaluate a model by writing parameters to file, running a shell script and reading the results from the file created by the shell script. |
|
Create a queriable function that stores samples and associated function values and returns stored values for samples in the database or otherwise evaluate the function. |
|
Define a multi-index model to be used for multi-index collocation |
pyapprox.multifidelity Package
The pyapprox.multifidelity
module implements numerous multi-fidelity
algorithms for quantifying uncertainty and building surrgates from multiple
models of varying cost and fidelity.
Functions
|
|
|
Plot the variance reduction (relative to single model MC) for a list of optimized estimtors. |
Plot the number of samples allocated to each model for a set of estimators |
|
|
Plot a correlation matrix |
|
|
Estimate the covariance of a model ensemble from a set of pilot samples |
pyapprox.optimization Package
The pyapprox.optimization
module implements a number of popular tools for risk-averse regression and design.
Functions
Solve first order stochastic dominance (FSD) constrained least squares |
|
Solve second order stochastic dominance (SSD) constrained least squares |
|
|
Solve conditional value at risk (CVaR) regression problems. |
|
Solve quantile regression problems. |
|
Solve the safety margins least squares regression problem. |
pyapprox.surrogates Package
The pyapprox.surrogates
module implements numerous algorithms for
constructing surrogates.
Functions
Return the quadrature rule associated with the marginal. |
|
Use tensor-product Barycentric Lagrange interpolation to approximate a function. |
|
Use tensor-product piecewise polynomial basis to interpolate a function. |
|
|
Compute the nodes and weights needed to integrate a 2D function using piecewise linear interpolation |
|
Approximate a scalar or vector-valued function of one or more variables from a set of points provided by the user |
|
Adaptive approximation of a scalar or vector-valued function of one or more variables. |
Classes
A polynomial chaos expansion for independent random variables. |
|
|
A polynomial chaos expansion for dependent random variables. |
|
An adaptive PCE built using induced sampling and generalized sparse grid like refinement. |
|
An adaptive PCE built using multivariate Leja sequences and generalized sparse grid like refinement. |
|
Adaptive sparse grid that uses the combination technique. |
pyapprox.util Package
The pyapprox.util
module implements numerous foundational utilities.
Functions
|
Compute the cartesian product of an arbitray number of sets. |
|
Construct the outer product of an arbitary number of sets. |
|
Compare a user specified jacobian with the jacobian computed with finite difference with multiple step sizes. |
|
Plot 2D samples |
pyapprox.variables Package
The pyapprox.variables
module provides tools for creating and
transforming multivariate random variables.
Functions
|
Print statistics about a set of samples and associated values |
Convert design variables to random variables defined over them optimization bounds. |
Classes
|
Class representing independent random variables |
|
Multivariate random variable with Gaussian correlation and arbitrary marginals |
Base class for multivariate variables. |
|
|
Apply an affine transformation to a |
|
Apply the Nataf transformation to an arbitraty multivariate random variable. |
|
Apply the Rosenblatt transformation to an arbitraty multivariate random variable. |
|
Class which maps one-to-one configure indices in [0, 1, 2, 3,...] to a set of configure values accepted by a function |