See doxygen generated documentation
The source code of this library aims to be accessible to all those interested in Probabilistic Graphical Models. The primary goal is to facilitate the understanding of models and basic inference strategies using well documented data structures based only on Python 3 standard library. Functions are annotated whenever possible.
Note that there are other alternatives on the subject:
We distinguish from these by the following traits:
-
Though not an entirely graph library like NetworkX, This library is more focused on Graph Theory than probabilistic structures. We implement several graph structures by the book. For example,
Tree
s are implemented as aGraph
, just likePath
s. -
Several graph analysis algorithms for:
-
Finding bridges
-
Finding articulation points
-
Finding connected components
-
Finding minimum and maximum spanning trees.
-
Finding shortest paths.
-
-
We are also one of the rare open sourced python libraries that support inference on LWF Chain Graphs also known as Mixed Graphs. As the overall library is not built for efficiency, we recommend not to use it in production. It should not be to difficult to transfer the concepts introduced in the source code though.
-
References are important for us. Whenever possible we add a reference to a published ressource to the doc string of the function/class. This also applies for tests.
The entire library depends only on Python standard library. It is tested for Python 3.6 through Github Actions at each push to the library. If you have Python 3.6+, you should be good to go for installation.
If you want to install without creating a virtual environment, just go to the main project directory that contains this readme file and call from terminal:
pip install .
If you prefer conda for managing your virtual environments, simply create a new environment:
conda create -n pygmodels python=3.6
Activate the environment:
conda activate pygmodels
Install the library:
pip install .
Lastly test your installation with following command:
python -m unittest
You should see something like the following on the terminal:
Ran 179 tests in 0.666s
OK
See Related Pages section under the docs.
See Contributing.md
For citing in a paper for general usage, use the JOSS paper DOI:
If you absolutely need to reference to a particular version of a source code, you can use the zenodo DOI: