chaospy

Chaospy - Toolbox for performing uncertainty quantification.

Github星跟踪图

.. image:: doc/.static/chaospy_logo.svg
:height: 300 px
:width: 300 px
:align: center, circleci, codecov, pypi, readthedocs, .., circleci, image:: https://circleci.com/gh/jonathf/chaospy/tree/master.svg?style=shield
:target: https://circleci.com/gh/jonathf/chaospy/tree/master
.., codecov, image:: https://codecov.io/gh/jonathf/chaospy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jonathf/chaospy
.., pypi, image:: https://badge.fury.io/py/chaospy.svg
:target: https://badge.fury.io/py/chaospy
.., readthedocs, image:: https://readthedocs.org/projects/chaospy/badge/?version=master
:target: http://chaospy.readthedocs.io/en/master/?badge=master

Chaospy is a numerical tool for performing uncertainty quantification using
polynomial chaos expansions and advanced Monte Carlo methods implemented in
Python.

If you are using this software in work that will be published, please cite the
journal article: Chaospy: An open source tool for designing methods of uncertainty quantification <http://dx.doi.org/10.1016/j.jocs.2015.08.008>_

.. contents:: Table of Contents:

Installation

Installation should be straight forward::

pip install chaospy

And you should be ready to go.

Alternatively, to get the most current experimental version, the code can be
installed from Github as follows::

git clone git@github.com:jonathf/chaospy.git    # first time only
cd chaospy/
git pull                                        # after the first time
pip install .

Example Usage

chaospy is created to be simple and modular. A simple script to implement
point collocation method will look as follows:

.. code-block:: python

import chaospy
import numpy

# your code wrapper goes here
def foo(coord, prm):
    """Function to do uncertainty quantification on."""
    return prm[0] * numpy.e ** (-prm[1] * numpy.linspace(0, 10, 100))

# bi-variate probability distribution
distribution = chaospy.J(chaospy.Uniform(1, 2), chaospy.Uniform(0.1, 0.2))

# polynomial chaos expansion
polynomial_expansion = chaospy.orth_ttr(8, distribution)

# samples:
samples = distribution.sample(1000)

# evaluations:
evals = [foo(sample) for sample in samples.T]

# polynomial approximation
foo_approx = chaospy.fit_regression(
    polynomial_expansion, samples, evals)

# statistical metrics
expected = chaospy.E(foo_approx, distribution)
deviation = chaospy.Std(foo_approx, distribution)

For a more extensive description of what going on, see the tutorial <https://chaospy.readthedocs.io/en/master/tutorial.html>_.

For a collection of recipes, see the cookbook <https://chaospy.readthedocs.io/en/master/cookbook.html>_.

Chaospy is being used in other related projects that requires uncertainty
quantification components chaospy provides.

+-----------------+-----------------------------------------------------------+, easyVVUQ, Library designed to facilitate verification, validation, and uncertainty quantification., +-----------------+-----------------------------------------------------------+, STARFiSh, Shell-based, scientific simulation program, for blood flow in mammals., +-----------------+-----------------------------------------------------------+, Profit, Probabilistic response model fitting via interactive, tools., +-----------------+-----------------------------------------------------------+, UncertainPy, Uncertainty quantification and sensitivity analysis,, tailored towards computational neuroscience., +-----------------+-----------------------------------------------------------+, SparseSpACE_, Spatially adaptive combination technique targeted to, solve high dimensional numerical integration., +-----------------+-----------------------------------------------------------+

.. _easyVVUQ: https://github.com/UCL-CCS/EasyVVUQ
.. _STARFiSh: https://www.ntnu.no/starfish
.. _Profit: https://github.com/redmod-team/profit
.. _UncertainPy: https://github.com/simetenn/uncertainpy
.. _SparseSpACE: https://github.com/obersteiner/sparseSpACE

Also a few shout-outs:

+--------------+--------------------------------------------------------------+, OpenTURNS, Thanks to Régis Lebrun for both proposing a collaboration, and creating an initial implementation of both, Chaospy Compatibility_ in OpenTURNS_ and, OpenTURNS Compatibility_ in chaospy., +--------------+--------------------------------------------------------------+, orthopy, Thanks to Nico Schlömer for providing the implementation, quadpy, for several of the quadrature integration methods., +--------------+--------------------------------------------------------------+, UQRF, Thanks to Florian Künzner for providing the, implementation for sample distribution_., +--------------+--------------------------------------------------------------+

.. _OpenTURNS: http://openturns.github.io/openturns/latest
.. _Régis Lebrun: https://github.com/regislebrun
.. _Chaospy Compatibility: http://openturns.github.io/openturns/latest/user_manual/_generated/openturns.ChaospyDistribution.html
.. OpenTURNS Compatibility: https://chaospy.readthedocs.io/en/master/recipes/external.html#module-chaospy.external.openturns
.. _orthopy: https://github.com/nschloe/orthopy
.. _quadpy: https://github.com/nschloe/quadpy
.. _Nico Schlömer: https://github.com/nschloe
.. _Florian Künzner: https://github.com/flo2k
.. _sample distribution: https://chaospy.readthedocs.io/en/master/recipes/external.html#module-chaospy.external.samples

Questions & Troubleshooting

For any problems and questions you might have related to chaospy, please
feel free to file an issue <https://github.com/jonathf/chaospy/issues>_.

主要指标

概览
名称与所有者jonathf/chaospy
主编程语言Python
编程语言Python (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-08-11 17:54:25
推送于2025-03-10 10:35:20
最后一次提交2025-03-09 09:23:05
发布数91
最新版本名称v4.3.19 (发布于 )
第一版名称v2.2.2 (发布于 )
用户参与
星数462
关注者数22
派生数87
提交数670
已启用问题?
问题数259
打开的问题数56
拉请求数167
打开的拉请求数5
关闭的拉请求数7
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?