Edward is a Python library for probabilistic modeling, inference, and criticism. It is a testbed for fast experimentation and research with probabilistic models, ranging from classical hierarchical models on small data sets to complex deep probabilistic models on large data sets. Edward fuses three fields: Bayesian statistics and machine learning, deep learning, and probabilistic programming.
It supports modeling languages including
- TensorFlow (with neural networks via Keras, TensorFlow-Slim, or Pretty Tensor)
- Stan
- PyMC3
- Python, through NumPy/SciPy
It supports inference via
- Variational inference
- Black box variational inference
- Stochastic variational inference
- Variational auto-encoders
- Inclusive KL divergence (KL(p || q))
- Laplace approximation
- Marginal posterior optimization (empirical Bayes, marginal maximum likelihood)
- Maximum a posteriori (penalized maximum likelihood, maximum likelihood)
It supports criticism of the model and inference via
- Evaluations on both supervised and unsupervised tasks
- Posterior predictive checks
It also has features including
- TensorFlow for backend computation, which includes computational graphs, distributed training, CPU/GPU integration, automatic differentiation, and TensorBoard
- A library for probability distributions in TensorFlow
- Documentation and tutorials
- Examples demonstrating state-of-the-art generative models and inference
You can find a tutorial here
for getting started with Edward. We highlight a few examples, more of
which can be found in examples/
:
- Bayesian linear regression
- Hierarchical logistic regression
- Mixture model of Gaussians
- Gaussian process classification
- Bayesian neural network
- Mixture density network
- Variational auto-encoder
- Importance-weighted variational inference
Read the documentation on the website.
To install the latest stable version, run
pip install edward
To install the latest development version, run
pip install -e "git+https://github.com/blei-lab/edward.git#egg=edward"
Edward is led by Dustin Tran with guidance by David Blei. It is under active development (by order of joining) by Dustin Tran, David Blei, Alp Kucukelbir, Adji Dieng, Maja Rudolph, and Dawen Liang. We welcome contributions by submitting issues, feature requests, or by solving any current issues!
We thank Rajesh Ranganath, Allison Chaney, Jaan Altosaar, and other members of the Blei Lab for their helpful feedback and advice.
We appreciate citations for Edward because it lets us find out how people have been using the library and it motivates further work.
Dustin Tran, David M. Blei, Alp Kucukelbir, Adji Dieng, Maja Rudolph, and Dawen Liang. 2016. Edward: A library for probabilistic modeling, inference, and criticism. http://edwardlib.org
@misc{tran2016edward,
author = {Dustin Tran and David M. Blei and Alp Kucukelbir and Adji Dieng and Maja Rudolph and Dawen Liang},
title = {{Edward: A library for probabilistic modeling, inference, and criticism}},
year = {2016},
url = {http://edwardlib.org}
}