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.
Install the core package from PyPI:
pip install pyjptDepending 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 trackingMultiple groups can be combined:
pip install pyjpt[matplotlib,mlflow]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.
cd test
python -m unittest discoverpython -m build # sdist + wheel
python -m build --sdist # source distribution only
python -m build --wheel # wheel onlyThe documentation is hosted on Read the Docs.
Install the documentation dependencies:
pip install -r doc/requirements.txtThen build the HTML documentation from the doc/ directory:
cd doc
make htmlThe 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.
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}
}