Skip to main content

Toolbox for non-intrusive functional approximation of data via (sparse) general polynomial chaos.

Project description

PyThia Logo Full

PyThia Uncertainty Quantification Toolbox

The PyThia UQ toolbox uses polynomial chaos surrogates to efficiently generate a surrogate of any (parametric) forward problem. The surrogate is fast to evaluate, allows analytical differentiation and has a built-in global sensitivity analysis via Sobol indices. Assembling the surrogate is done non-intrusive by least-squares regression, hence only training pairs of parameter realizations and evaluations of the forward problem are required to construct the surrogate. No need to compute any nasty interfaces for lagacy code.

Why the Name?

Pythia was the title of the high priestess of the temple of Apollo in Delphi. Hence you could say she used her prophetic abilities to quantify which was uncertain. Moreover, the package is written in python, so...

Installation

The latest stable version of PyThia can be installed using pip

pip install pythia-uq

To install PyThia from source, i.e., if you want to work with the latest (and possibly unstable) changes, simply clone the repository and run the setup script to install PyThia to any environment

cd path/to/pythia-repo/
pip install .

PyThia can then be imported from any location with import pythia.

Documentation

The documentation of the stable package version can be found here: pythia-uq.rtfd.io. For other versions of the documentation, see https://readthedocs.org/projects/pythia-uq/.

How to cite PyThia

There is no official related article to cite PyThia yet. If you make use of PyThia in a publication, please use the meta data from the CITATION.cff file or cite it with a BibTeX entry similar to this:

@software{pythia,
    author = {Farchmin, Nando and Heidenreich, Sebastian},
    title = {PyThia UQ Toolbox},
    version = {3.1.0},
    url = {https://pythia-uq.readthedocs.io/en/v3.1.0/},
    year = {2022},
    month = {12}
}

Want to contribute?

Check out the contribution guidelines on how to create issues or file bug reports and feature requests. Or ever better start developping the PyThia project yourself after reading the development guidelines.

License

This work is dual-licensed under GNU Lesser General Public License v3.0 or later and Hippocratic License 3.0 or later. You can choose between one of them if you use this work.

SPDX-License-Identifier: LGPL-3.0-or-later OR Hippocratic-3.0-ECO-MEDIA-MIL

Funding

The development of PyThia UQ Toolbox vers. 1 and 2 has been funded by the German Central Innovation Program (ZIM) No. ZF4014017RR7. The development of PyThia UQ Toolbox vers. 3 has been funded by the EMPIR project 20IND04-ATMOC.

References

Here we list the papers that describe concepts implemented in PyThia for the interested user. In principle PyThia uses a (sparse) polynomial chaos expansion to construct a surrogate of any function via least-squares regression. We first applied the PyThia software package to analyse the sensitivities of a scatterometry experiment [^pythia-scat-A] using global sensitivity analysis via Sobol indices [^sobol-indices]. We also solved the inverse problem for the same experiment [^pythia-scat-B] via Bayesian inversion. To use a minimal but still sufficient amount of random samples for the regression, we integrated weighted least-squares sampling [^wls-sampling] into PyThia.

[^pythia-scat-A]: An efficient approach to global sensitivity analysis and parameter estimation for line gratings [^pythia-scat-B]: Efficient Bayesian inversion for shape reconstruction of lithography masks [^sobol-indices]: Global sensitivity analysis using polynomial chaos expansions [^wls-sampling]: Optimal weighted least-squares methods

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythia-uq-3.1.0.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythia_uq-3.1.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file pythia-uq-3.1.0.tar.gz.

File metadata

  • Download URL: pythia-uq-3.1.0.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for pythia-uq-3.1.0.tar.gz
Algorithm Hash digest
SHA256 b33c7ab5d37427eef050f3a2b5e941310f430e715ecbfb3e49e106a8e5efa984
MD5 020f62e918f6e0f8b737fa0b78b8fc49
BLAKE2b-256 a0071986c2e82d86e415fc8f454e6d5290dd0030e9f4099f07016469b1525e92

See more details on using hashes here.

File details

Details for the file pythia_uq-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythia_uq-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for pythia_uq-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 172a63da89c2f9daa62661edc0dc2734bbe631053f068f23210415fb11015d85
MD5 0b7a8452ea88318da1ee3dfa805e9cea
BLAKE2b-256 fb3e06c0ef0a6abfc12d2116b9f91535c7c43fcd3530b7eda26ad47fac4f58b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page