Counting 3,834 Big Data & Machine Learning Frameworks, Toolsets, and Examples...
Suggestion? Feedback? Tweet @stkim1

Last Commit
May. 22, 2019
Nov. 24, 2014

Build Status Build Status Documentation Status Binder

Please consider citing the JMLR-MLOSS Manuscript if you've used pomegranate in your academic work!

pomegranate is a package for probabilistic models in Python that is implemented in cython for speed. It's focus is on merging the easy-to-use scikit-learn API with the modularity that comes with probabilistic modeling to allow users to specify complicated models without needing to worry about implementation details. The models are built from the ground up with big data processing in mind and so natively support features like out-of-core learning and parallelism. Click on the binder badge above to interactively play with the tutorials!


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


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/Kmeans++/Kmeans||
  • Factor Graphs


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.


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 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.

Latest Releases
 Feb. 16 2019
 Aug. 8 2018
 Jan. 3 2018
 Oct. 27 2017
 Oct. 9 2017