Joint Probability Trees - A formalism for learning and reasoning about joint probability distributions
Project description
Joint Probability Trees
Joint Probability Trees (JPTs) are a formalism for learning and reasoning about joint probability distributions that is tractable for practical applications. JPTs support both symbolic and subsymbolic variables in a single hybrid model without relying on prior knowledge about variable dependencies or families of distributions.
JPT representations build on tree structures that partition the probability space into relevant subregions elicited from training data, rather than postulating a rigid dependency model prior to learning. Learning and inference scale linearly, and the tree structure enables white-box reasoning about any posterior probability P(Q|E), providing interpretable explanations for every inference result.
Installation
Install the core package from PyPI:
pip install pyjpt
Optional dependencies
Depending on your use case, install one or more optional dependency groups:
pip install pyjpt[matplotlib] # matplotlib and graphviz plotting
pip install pyjpt[plotly] # interactive plotly plotting
pip install pyjpt[seq] # sequential/temporal models
pip install pyjpt[mlflow] # MLflow experiment tracking
Multiple groups can be combined:
pip install pyjpt[matplotlib,mlflow]
Development setup
Clone the repository and install in editable mode with all development dependencies:
git clone https://github.com/joint-probability-trees/jpt-dev
cd jpt-dev
pip install -e ".[dev]"
By default, Cython extensions are compiled during installation. For
development, you can skip pre-compilation and let pyximport handle
on-the-fly compilation at runtime instead:
JPT_NO_CYTHON=1 pip install -e ".[dev]"
With on-the-fly compilation, changes to .pyx files are picked up
automatically on the next import without requiring a rebuild.
Running tests
cd test
python -m unittest discover
Building distributions
python -m build # sdist + wheel
python -m build --sdist # source distribution only
python -m build --wheel # wheel only
Documentation
The documentation is hosted on Read the Docs.
Building the documentation locally
Install the documentation dependencies:
pip install -r doc/requirements.txt
Then build the HTML documentation from the doc/ directory:
cd doc
make html
The output is written to doc/build/html/. Open doc/build/html/index.html
in a browser to view it. The html target automatically cleans previous
build artifacts before rebuilding.
Citation
If you use JPTs in your research, please cite:
@inproceedings{nyga23jpts,
title = {{Joint Probability Trees}},
author = {Daniel Nyga and Mareike Picklum and
Tom Schierenbeck and Michael Beetz},
year = {2023},
booktitle = {arxiv.org},
url = {http://arxiv.org/abs/2302.07167}
}
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 Distributions
Built Distributions
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 pyjpt-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyjpt-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3ec7d833372a0c85a0b4fe1989100efe6ed87de104c14c118afab0236abfee4
|
|
| MD5 |
875062700927c0681d86c4387e4cc956
|
|
| BLAKE2b-256 |
7be52c422f6295971211fb38803835ebbe04bf33991d221072c14b194cd2ec2e
|
File details
Details for the file pyjpt-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyjpt-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653f78aa15ff98ca94f195edc7906376e4551428212b544178f0a60a7661b441
|
|
| MD5 |
3a9a15878d71065a070d1fddb956da6a
|
|
| BLAKE2b-256 |
2816cbc917292ea700dd0493c21c121252d3597d6afc9a60b3c5e9d86cf228db
|
File details
Details for the file pyjpt-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyjpt-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a4817113ce473646998bf4482a9d807e273be7419a8bfb146bb7abeb83529f6
|
|
| MD5 |
76033fcd9e1e74a00fe93ecef25b7887
|
|
| BLAKE2b-256 |
f572ce4e2bc8baba3d0ea8a0189758cece5c95fb1afe8fa616b5b9c0ba9b293c
|
File details
Details for the file pyjpt-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyjpt-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d42c71381313bb401409d69fa931e8c327e7afc3efe60e7ad1ead886239ecf8a
|
|
| MD5 |
b6163dd109ba1541febcec77cb2c2800
|
|
| BLAKE2b-256 |
9be885336bc121f290877696733e9329d4c7e05b370a9c15e64ce17bff08c8ac
|