Skip to main content

tbnpy

tbnpy is a Python toolkit for tensor-based Bayesian networks (TBNs), designed for scalable probabilistic inference in systems with large, structured state spaces.
It is particularly suited to applications where classical Bayesian network implementations struggle due to combinatorial growth in system states.

The package provides:

  • A tensor-based formulation of Bayesian networks
  • Scalable exact and approximate inference algorithms
  • Support for hybrid discrete–continuous models
  • Reusable system-level rules and probabilistic components
  • Examples illustrating end-to-end modelling and inference workflows

Documentation

📘 Full documentation is available here:
👉 https://jieunbyun.github.io/tbnpy/

The online documentation includes:

  • Conceptual overview of tensor-based Bayesian networks
  • Installation and getting-started guides
  • API reference for all core modules
  • Worked examples (including the ABCDE example)
  • Repository structure and design rationale

Repository structure

tbnpy/
├── tbnpy/              # Core library
├── examples/           # Worked examples and case studies
├── docs/               # Sphinx documentation source
├── .github/            # CI/CD workflows (GitHub Actions)
└── README.md

Installation

The ndtools utilities can be installed either as a released package from PyPI or in editable (developer) mode from the source repository.

Install the latest released version from PyPI:

pip install tbnpy

This installs a stable version of the tools suitable for general use.

Verify the installation:

python -c "import tbnpy; print(tbnpy.__version__)"

Using pip (editable / developer install)

If you are developing tbnpy or working directly with the source code, install in editable mode from the repository root:

# Activate your environment first (if using conda)
conda activate <your-env>

# Install in editable mode
pip install -e .

Development status

tbnpy is under active development.
The API may evolve as new modelling patterns, inference strategies, and large-scale case studies are incorporated.

Citation

Citation

A dedicated tbnpy methodology paper is currently under preparation.
In the meantime, please cite the following related work:

Byun, J.-E., & Song, J. (2021). Generalized matrix-based Bayesian network for multi-state systems. Reliability Engineering & System Safety, 211, 107468.

License

This project is released under an MIT license.
See the repository for license details.


For detailed usage, examples, and API documentation, please refer to:
🔗 https://jieunbyun.github.io/tbnpy/

Metadata

Release files for tbnpy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tbnpy 0.2.0
File Size Uploaded Provenance Actions
tbnpy-0.2.0.tar.gz 67.8 kB Without provenance Details for tbnpy-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tbnpy 0.2.0
File Interpreter ABI Platform Actions
tbnpy-0.2.0-py3-none-any.whl Python 3 none any Details for tbnpy-0.2.0-py3-none-any.whl

Total release size: 120.0 kB

Release files / tbnpy-0.2.0.tar.gz

Download URL tbnpy-0.2.0.tar.gz
Size 67.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4ca6879c2a2104fbc3b23833e5afa0ce1ad7224fa070e817c845c435a8354db4
BLAKE2b-256 checksum
How to use checksums
c84b097443d1c5a26626b2ca67dac58ef2c954581c2745c5bd0e074bb8b196d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / tbnpy-0.2.0-py3-none-any.whl

Download URL tbnpy-0.2.0-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d471b6e12cb616d11f029e033e32fe5ae3a85522cb7b971a3cc37631ed74319
BLAKE2b-256 checksum
How to use checksums
76ddba7be7da4c82163871025cbdcd540cdbdbd372cc281909d59c046302dcca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Security for tbnpy 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page