Defining and handling variable sets with probability distributions for surrogate modelling and uncertainty quantification applications
Project description
uncertain_variables
A Python package for defining and handling variable sets with probability distributions for surrogate modelling and uncertainty quantification applications.
- Website: https://buildchain.ilab.sztaki.hu/
- Source code: https://github.com/TRACE-Structures/uncertain_variables
- Bug reports: https://github.com/TRACE-Structures/uncertain_variables/issues
Overview
The uncertain_variables package provides a comprehensive framework for working with random variables and their probability distributions in the context of uncertainty quantification (UQ) and surrogate modelling. It supports various sampling methods, polynomial chaos expansion (PCE) integration, and distribution transformations.
Features
- Multiple Distribution Types: Normal, Uniform, Log-Normal, Beta, Exponential, and Wigner Semicircle distributions
- Variable Management: Create and manage sets of variables with associated probability distributions
- Advanced Sampling Methods:
- Monte Carlo (MC)
- Quasi-Monte Carlo: Halton, Latin Hypercube (LHS), Sobol sequences
- Saltelli sampling for sensitivity analysis
- Polynomial Systems: Support for orthogonal polynomial systems (Legendre, Hermite, Jacobi, Chebyshev, Laguerre)
- Space Transformations: Convert between parameter space, germ space, and standard normal space
- Unit Conversion: Built-in support for physical unit conversions using
pint - GPC Integration: Seamless integration with generalized Polynomial Chaos Expansion methods
Core Components
Distribution Classes
The package includes several distribution types in distributions.py:
NormalDistribution: Gaussian distribution with mean and standard deviationUniformDistribution: Uniform distribution over [min, max]LogNormalDistribution: Log-normal distributionBetaDistribution: Beta distribution with shape parametersExponentialDistribution: Exponential distribution with rate parameterWignerSemicircleDistribution: Wigner semicircle distributionTranslatedDistribution: Shifted and scaled version of any base distribution
Each distribution supports:
- Probability density function (
pdf) - Cumulative distribution function (
cdf) - Inverse CDF / Percent point function (
ppf) - Moment calculation (
mean,var,moments) - Sampling (
sample) - Space transformations (
dist2base,base2dist)
Variable Class
The Variable class represents a single random or deterministic variable:
- Associates a name with a distribution or fixed value
- Supports physical units with automatic conversion
- Provides access to distribution properties (mean, variance, pdf, cdf)
- Enables germ space transformations for polynomial chaos expansions
VariableSet Class
The VariableSet class manages collections of variables:
- Add multiple variables with unique names
- Compute joint statistics (mean vector, variance vector, joint PDF)
- Generate samples using various methods
- Filter and create subsets of variables
- Support polynomial chaos expansion workflows
Polynomial Systems
The polysys.py module implements orthogonal polynomial systems:
LegendrePolynomials: For uniform distributionsHermitePolynomials: For normal distributionsJacobiPolynomials: For beta distributionsChebyshevTPolynomials: Chebyshev polynomials of the first kindChebyshevUPolynomials: Chebyshev polynomials of the second kindLaguerrePolynomials: For exponential distributions
Authors and acknowledgment
The code is developed by András Urbanics, Bence Popovics, Emese Vastag, Elmar Zander and Noémi Friedman in the TRACE-Structures group.
The research and the development is founded by the Eurpean Union as part of the BUILDCHAIN project.
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0-only). See the LICENSE file for details.
Support
For issues, questions, or contributions, please refer to the project repository or contact the authors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uncertain_variables-0.1.2.tar.gz.
File metadata
- Download URL: uncertain_variables-0.1.2.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69f534528f5bb46f3f1c1e51ae911d89fbcebb28fc162a64095cb3828fc0ae72
|
|
| MD5 |
6ac67930e9317b46674b1bd10950db51
|
|
| BLAKE2b-256 |
fe6a07f2782b5ccc1649199fafcc9f3341f04c6eba24f55189c309ba68aadf73
|
Provenance
The following attestation bundles were made for uncertain_variables-0.1.2.tar.gz:
Publisher:
pypi-publish.yml on TRACE-Structures/uncertain_variables
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uncertain_variables-0.1.2.tar.gz -
Subject digest:
69f534528f5bb46f3f1c1e51ae911d89fbcebb28fc162a64095cb3828fc0ae72 - Sigstore transparency entry: 761948457
- Sigstore integration time:
-
Permalink:
TRACE-Structures/uncertain_variables@0d39ca0ca669a9f7d590e0341f372eb853dae300 -
Branch / Tag:
- Owner: https://github.com/TRACE-Structures
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0d39ca0ca669a9f7d590e0341f372eb853dae300 -
Trigger Event:
release
-
Statement type:
File details
Details for the file uncertain_variables-0.1.2-py3-none-any.whl.
File metadata
- Download URL: uncertain_variables-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
593399fef3fe1889be10cd26ea706267709ffbe79da7ffa41af458eb2c65e63e
|
|
| MD5 |
25d5219c651492b0848426169c634f11
|
|
| BLAKE2b-256 |
0551673a39144aaef6855483eb3c35806efdd7104d5355e17c32d100f955fd75
|
Provenance
The following attestation bundles were made for uncertain_variables-0.1.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on TRACE-Structures/uncertain_variables
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uncertain_variables-0.1.2-py3-none-any.whl -
Subject digest:
593399fef3fe1889be10cd26ea706267709ffbe79da7ffa41af458eb2c65e63e - Sigstore transparency entry: 761948472
- Sigstore integration time:
-
Permalink:
TRACE-Structures/uncertain_variables@0d39ca0ca669a9f7d590e0341f372eb853dae300 -
Branch / Tag:
- Owner: https://github.com/TRACE-Structures
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0d39ca0ca669a9f7d590e0341f372eb853dae300 -
Trigger Event:
release
-
Statement type: