Daft

Daft is a Python package that uses matplotlib to render pixel-perfect probabilistic graphical models for publication in a journal or on the internet. With a short Python script and an intuitive model-building syntax you can design directed (Bayesian Networks, directed acyclic graphs) and undirected (Markov random fields) models and save them in any formats that matplotlib supports (including PDF, PNG, EPS and SVG).

👉 Check out the Examples to get started.

Installation

Installing the most recent stable version of Daft should be pretty easy if you use pip:

python -m pip install daft

Otherwise, you can download the source and run:

python -m pip install -e .

in the root directory.

Daft only depends on matplotlib and numpy. These are standard components of the scientific Python stack but if you don’t already have them installed pip will try to install them for you.

Issues

If you have any problems or questions, open an “issue” on Github.

Authors & Contributions

Daft is being developed and supported by David S. Fulford, Dan Foreman-Mackey and David W. Hogg.

For the hackers in the house, development happens on Github and we welcome pull requests. In particular, we’d love to see examples of how you’re using Daft in your work.

License

Copyright 2012-2021 Daft Developers.

Daft is free software made available under the MIT License. For details see the LICENSE file.

If you use Daft in academic projects, acknowledgements are greatly appreciated.

API