Jupyter Notebook Python Other
Clone or download
jkleckner and jmschrei Read docs version from pomegranate package (#465)
The documentation for pomegranate perpetually says 0.6.0 when built from
source.  This change sets it from the pomegranate version at the time of
building the doc.
Latest commit 9fed644 Jul 17, 2018


Build Status Build Status Documentation Status

NOTE: pomegranate does not yet work with networkx 2.0. If you have problems, please downgrade networkx and try again.

JMLR-MLOSS Manuscript Please consider citing it if you used it in your academic work.

pomegranate is a package for probabilistic and graphical models for Python, implemented in cython for speed. It grew out of the YAHMM package, where many of the components of a hidden Markov model could be re-arranged to form other probabilistic models. It currently supports:

The discrete Bayesian networks also support novel work on structure learning in the presence of constraints through a constraint graph. These constraints can dramatically speed up structure learning through the use of loose general prior knowledge, and can frequently make the exact learning task take only polynomial time instead of exponential time. See the PeerJ manuscript for the theory and the pomegranate tutorial for the practical usage!

To support the above algorithms, it has efficient implementations of the following:

  • Kmeans
  • Factor Graphs

It currently supports the following features:

Please take a look at the tutorials folder, which includes several tutorials on how to effectively use pomegranate!

See the website for extensive documentation, API references, and FAQs about each of the models and supported features.

No good project is done alone, and so I'd like to thank all the previous contributors to YAHMM, and all the current contributors to pomegranate, including the graduate students who share my office I annoy on a regular basis by bouncing ideas off of.


pomegranate requires:

- Cython (only if building from source)
- NumPy
- SciPy
- NetworkX
- joblib

To run the tests, you also must have nose installed.

User Installation

pomegranate is pip installable using pip install pomegranate and conda installable using conda install pomegranate. If that does not work, more detailed installation instructions can be found here.


If you would like to contribute a feature then fork the master branch (fork the release if you are fixing a bug). Be sure to run the tests before changing any code. You'll need to have nosetests installed. The following command will run all the tests:

python setup.py test

Let us know what you want to do just in case we're already working on an implementation of something similar. This way we can avoid any needless duplication of effort. Also, please don't forget to add tests for any new functions.