Skip to content
Python library for sampling Determinantal Point Processes
Python Jupyter Notebook Shell
Branch: master
Clone or download
guilgautier Merge pull request #60 from guilgautier/reduce-deps
Reduce number of dependencies for DPPy
Latest commit 33fcdcd Jan 11, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update Aug 22, 2018
docs Merge pull request #60 from guilgautier/reduce-deps Jan 11, 2020
dppy Merge pull request #60 from guilgautier/reduce-deps Jan 11, 2020
notebooks continue reshaping the multivariate jacobi ensemble: more readable, b… Nov 10, 2019
scripts Another try to fix this TkAgg backend issue by importing tinker Jul 3, 2019
tests Update sampling from DPP(L) with L_dual kernel Jan 7, 2020
.gitignore Add notebook for multivariate Jacobi ensemble Jun 12, 2019
.travis.yml Create Aug 22, 2018
LICENSE Initial commit Apr 13, 2018
requirements.txt fix extra dependency zono, cvxopt -> zonotope Dec 26, 2019 continue reshaping the multivariate jacobi ensemble: more readable, b… Nov 10, 2019


DPPy: Sampling Determinantal Point Processes with Python

Documentation Status Build Status Coverage Status PyPI package

"Anything that can go wrong, will go wrong"Murphy's Law


Determinantal point processes (DPPs) are specific probability distributions over clouds of points that have been popular as models or computational tools across physics, probability, statistics, and more recently of booming interest in machine learning. Sampling from DPPs is a nontrivial matter, and many approaches have been proposed. DPPy is a Python library that puts together all exact and approximate sampling algorithms for DPPs.


DPPy works with Python 3.4+.


This project depends on the following libraries, which are automatically downloaded during installation:

The following dependencies are optional, and unlock extra functionality if installed:

  • Networkx to play with uniform spanning trees .

  • CVXOPT to use the zono_sampling MCMC sampler for finite DPPs. CVXOPT itself requires GCC,

    • On MAC it comes with Xcode

    • On UNIX, use your package manager (apt, yum etc)

      sudo apt install -qq gcc g++
  • Sphinx to modify and rebuild the documentation

Installation instructions

DPPy is now available on PyPI PyPI package

pip install dppy

For a full installation, including extra dependencies and dependencies necessary to build the documentation (see above), use pip install dppy['zonotope','trees','docs'].

Note that only stable DPPy releases are available on PyPI, and recently included improvements might only be available on the git master branch. If you want to work with the latest version of DPPy

  1. If you have a GitHub account please consider forking DPPy and use git to clone your copy of the repo

    cd <directory_of_your_choice>
    git clone<username>/DPPy.git
  2. If you only use git, clone this repository

    cd <directory_of_your_choice>
    git clone
  3. Otherwise simply download the project

  4. In any case, install the project with

    cd DPPy
    pip install .

Use pip install .['zonotope','trees','docs'] to perform a full install from a local source tree.

How to use it

The main DPPy documentation is available online at There are also some interactive tutorials using Jupyter available at For more details, check below.

Tutorials in Jupyter notebooks

You can read and work on these interactive tutorial Notebooks, directly from your web browser, without having to download or install Python or anything. Just click, wait a little bit, and play with the notebook!

Building the documentation

The documentation is generated locally with Sphinx and then built online by ReadTheDocs. If you wish to contribute to the documentation or just play with it locally, you can install the necessary dependencies and then:

  • Generate the docs locally

    cd DPPy/docs
    make html
  • Open the local HTML version of the documentation located at DPPy/docs/_build/html/index.html

    open _build/html/index.html

How to cite this work?

We wrote a companion paper to DPPy which got accepted for publication in the MLOSS track of JMLR.

If you use this package, please consider citing it with this piece of BibTeX:

  author = {Gautier, Guillaume and Polito, Guillermo and Bardenet, R{\'{e}}mi and Valko, Michal},
  journal = {Journal of Machine Learning Research - Machine Learning Open Source Software (JMLR-MLOSS)},
  title = {{DPPy: DPP Sampling with Python}},
  keywords = {Computer Science - Machine Learning, Computer Science - Mathematical Software, Statistics - Machine Learning},
  url = {},
  year = {2019},
  archivePrefix = {arXiv},
  arxivId = {1809.07258},
  note = {Code at Documentation at}

Many of the algorithms implemented in DPPy also have associated literature that you should consider citing. Please refer to the docs and documentation strings of each specific DPP sampler for details.


We would like to thank Guillermo Polito for leading our reproducible research workgroup, this project owes him a lot.

Take a look at the corresponding booklet to learn more on how to make your research reproducible!

You can’t perform that action at this time.