Skip to main content

A library for Probabilistic Graphical Models

Project description

Build Downloads Version Python Version License asv

Join the pgmpy Discord server Read the Docs Examples Tutorial

pgmpy is a Python package for working with Bayesian Networks and related models such as Directed Acyclic Graphs, Dynamic Bayesian Networks, and Structural Equation Models. It combines features from both causal inference and probabilistic inference literatures to allow users to seamlessly work between both. It implements algorithms for structure learning/causal discovery, parameter estimation, probabilistic and causal inference, and simulations.

Examples

  • Creating a Bayesian Network: view | Open In Colab
  • Structure Learning/Causal Discovery: view | Open In Colab
  • Parameter Learning: view | Open In Colab
  • Probabilistic Inference: view | Open In Colab
  • Causal Inference: view | Open In Colab
  • Extending pgmpy: view | Open In Colab

Citing

If you use pgmpy in your scientific work, please consider citing us:

Ankur Ankan, & Abinash Panda ( 2015 ). pgmpy: Probabilistic Graphical Models using Python . In Proceedings of the 14th Python in Science Conference (pp. 6 - 11 ).

Bibtex:

@InProceedings{ Ankan2015,
  author    = { {A}nkur {A}nkan and {A}binash {P}anda },
  title     = { pgmpy: {P}robabilistic {G}raphical {M}odels using {P}ython },
  booktitle = { {P}roceedings of the 14th {P}ython in {S}cience {C}onference },
  pages     = { 6 - 11 },
  year      = { 2015 },
  editor    = { {K}athryn {H}uff and {J}ames {B}ergstra },
  doi       = { 10.25080/Majora-7b98e3ed-001 }
}

Development

Code

The latest codebase is available in the dev branch of the repository.

Building from Source

To install pgmpy from the source code:

$ git clone https://github.com/pgmpy/pgmpy
$ cd pgmpy/
$ pip install -r requirements.txt
$ python setup.py install

To run the tests, you can use pytest:

$ pytest -v pgmpy

If you face any problems during installation let us know, via issues, mail or at our gitter channel.

Contributing

Please feel free to report any issues on GitHub: https://github.com/pgmpy/pgmpy/issues.

Before opening a pull request, please have a look at our contributing guide If you face any problems in pull request, feel free to ask them on the mailing list or gitter.

If you would like to implement any new features, please have a discussion about it before starting to work on it. If you are looking for some ideas for projects, we a list of mentored projects available at: https://github.com/pgmpy/pgmpy/wiki/Mentored-Projects.

Building Documentation

We use sphinx to build the documentation. Please refer: https://github.com/pgmpy/pgmpy/wiki/Maintenance-Guide#building-docs for steps to build docs locally.

License

pgmpy is released under MIT License. You can read about our license at here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgmpy-0.1.26.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

pgmpy-0.1.26-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file pgmpy-0.1.26.tar.gz.

File metadata

  • Download URL: pgmpy-0.1.26.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pgmpy-0.1.26.tar.gz
Algorithm Hash digest
SHA256 de8096175a8417f6bbac4e6ddb4a253c824947697d7beed93266d6e4163d039e
MD5 4e1266e03552c31eaa43cbeb80b66986
BLAKE2b-256 4d18fe04cb5a6b65df3f92a2b5123bf84cca9a67a392f22dcd4c98b0cbeee9c9

See more details on using hashes here.

File details

Details for the file pgmpy-0.1.26-py3-none-any.whl.

File metadata

  • Download URL: pgmpy-0.1.26-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pgmpy-0.1.26-py3-none-any.whl
Algorithm Hash digest
SHA256 23ff46f9ce8bc52c4e8795c0d5e70cdf3ec8ec8bbd351a151a07abd1b986d160
MD5 7aa108f9c5edea26904f37625bffcfbf
BLAKE2b-256 c7e6e451590c2341b3d59d7b613e1af80daefd9e2873f7c9ad3d498ad84e7f44

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page