Skip to main content

Rigorous computation with Uncertain Number in Python

Project description

Logo

Python Version version DOI Documentation Status license contributions welcome

Scientific computations are surrounded by various forms of uncertainty, requiring appropriate treatment to maximise the credibility of computations. Empirical information is often scarce, vague, conflicting and imprecise, requiring expressive uncertainty structures for trustful representation, aggregation and propagation.

This package is underpinned by a framework of uncertain number which allows for a closed computation ecosystem whereby trustworthy computations can be conducted in a rigorous manner. It provides capabilities across the typical uncertainty analysis pipeline, encompassing characterisation, aggregation, propagation, and applications including reliability analysis and optimisation under uncertainty, especially with a focus on imprecise probabilities.

Uncertain Number refers to a generalised representation that unifies several uncertainty constructs including real numbers, intervals, probability distributions, interval bounds on probability distributions (i.e. probability boxes), and finite DempsterShafer structures. It is mostly suitable for managing mixed types of uncertainties.

Getting started

Explore the documentation to get started, featuring hands-on tutorials and in-depth examples that showcase the power of the package.

pyuncertainnumber exposes APIs at different levels. It features high-level APIs best suited for new users to quickly start with uncertainty computations with uncertain numbers, and also low-level APIs allowing experts to have additional controls over mathematical constructs such as p-boxes, Dempster Shafer structures, probability distributions, etc.

Installation

PyUncertainNumber can be installed from PyPI. Upon activation of your virtual environment, use the code below in your terminal. For additional instructions, refer to installation guide.

pip install pyuncertainnumber

Capabilities

Logo

  • PyUncertainNumber is a Python package for generic computational tasks focussing on rigorous uncertainty analysis, which provides a research-grade computing environment for uncertainty characterisation, propagation, validation and uncertainty extrapolation.
  • PyUncertainNumber supports probability bounds analysis to rigorously bound the prediction for the quantity of interest with mixed uncertainty propagation.
  • PyUncertainNumber also features great natural language support as such characterisatin of input uncertainty can be intuitively done by using natural language like about 7 or simple expression like [15 +- 10%], without worrying about the elicitation.
  • Interoperability via serialization: features the save and loading of Uncertain Number objects to work with downstream applications.
  • Yields informative results during the computation process such as the combination that leads to the maximum in vertex method.

UQ multiverse

UQ is a big world (like Marvel multiverse) consisting of abundant theories and software implementations on multiple platforms. We focus mainly on the imprecise probability frameworks. Some notable examples include OpenCossan, UQlab in Matlab and UncertaintyQuantification.jl, ProbabilityBoundsAnalysis.jl in Julia, and many others of course. PyUncertainNumber is rooted in Python and has close ties with the Python scientific computing ecosystem, it builds upon and greatly extends a few pioneering projects, such as intervals, scipy-stats and pba-for-python to generalise probability and interval arithmetic. Beyond arithmetic, PyUncertainNumber has offered a wide spectrum of algorithms and methods for uncertainty characterisation, propagation, surrogate modelling, and optimisation under uncertainty, allowing imprecise uncertainty analysis in both intrusive and non-intrusive manner. PyUncertainNumber is under active development and will continue to be dedicated to support imprecise analysis in engineering using Python.

Citation

Yu Chen, Scott Ferson (2025). Imprecise uncertainty management with uncertain numbers to facilitate trustworthy computations., SciPy proceedings 2025.

A downloadable version can be accessed here.

@inproceedings{chen2025scipyproceed,
  title = {Imprecise uncertainty management with uncertain numbers to facilitate trustworthy computations},
  booktitle = {SciPy Proceedings},
  year = {2025},
  author = {Chen, Yu and Ferson, Scott},
  doi = {10.25080/ahrt5264}
}

@software{chen_2025_17235456,
  author       = {Chen, (Leslie) Yu},
  title        = {PyUncertainNumber},
  publisher    = {Zenodo},
  version      = {0.1.1},
  doi          = {10.5281/zenodo.17235456},
  url          = {https://doi.org/10.5281/zenodo.17235456},
}

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

pyuncertainnumber-0.1.2.tar.gz (197.6 kB view details)

Uploaded Source

Built Distribution

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

pyuncertainnumber-0.1.2-py3-none-any.whl (218.5 kB view details)

Uploaded Python 3

File details

Details for the file pyuncertainnumber-0.1.2.tar.gz.

File metadata

  • Download URL: pyuncertainnumber-0.1.2.tar.gz
  • Upload date:
  • Size: 197.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyuncertainnumber-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ffceef0fa8f41393f0ea57205b7f9ae201a658104c2e8f83ede0a8669c94a846
MD5 526e388ffd60242ca72b220c8dbad685
BLAKE2b-256 c336daabdfbe867ad2036405fcac0953367af1a9fc9c4362aa79ccaa90ab5870

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuncertainnumber-0.1.2.tar.gz:

Publisher: python-publish.yml on leslieDLcy/PyUncertainNumber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyuncertainnumber-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyuncertainnumber-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3dbd184046b68f4c2ee459fe7910eb83c3ce6224ecb2caf1ad3c06f03d952fc4
MD5 1f81ccb1b79cab170710d53e094c2265
BLAKE2b-256 e06a7a7320b4c1d62cb8b3acc9269d73708615ef4a00b0a3236c8822df094ba1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuncertainnumber-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on leslieDLcy/PyUncertainNumber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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