Skip to main content

DPPy is a Python library for exact and approximate sampling of Determinantal Point Processes.

Project description

Documentation Status Build Status Coverage Status PyPI package

“Anything that can go wrong, will go wrong”Murphy’s Law

Introduction

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.

Installation

DPPy works with Python 3.6+.

Dependencies

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 https://github.com/<username>/DPPy.git
  2. If you only use git, clone this repository

    cd <directory_of_your_choice>
    git clone https://github.com/guilgautier/DPPy.git
  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 http://dppy.readthedocs.io. There are also some interactive tutorials using Jupyter available at https://github.com/guilgautier/DPPy/blob/master/notebooks/. 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 Machine Learning Open Source Software track of JMLR.

If you use the DPPy toolbox, please consider citing it with this piece of BibTeX:

@article{GPBV19,
  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 = {http://jmlr.org/papers/v20/19-179.html},
  year = {2019},
  archivePrefix = {arXiv},
  arxivId = {1809.07258},
  note = {Code at http://github.com/guilgautier/DPPy/ Documentation at http://dppy.readthedocs.io/}
}

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

Reproducibility

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!

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

dppy-0.3.1.tar.gz (74.9 kB view details)

Uploaded Source

Built Distribution

dppy-0.3.1-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file dppy-0.3.1.tar.gz.

File metadata

  • Download URL: dppy-0.3.1.tar.gz
  • Upload date:
  • Size: 74.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for dppy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c4583cd8f850ed3899cd91154fa6c31b56e13f4a86b61eb547e2f1e3b5c64ec9
MD5 81b24d8120d36a745e8076f6107d42fd
BLAKE2b-256 87bb5abf218d4b47eeeecdd66252220c1d97586798113d7d944e8d9166494c2f

See more details on using hashes here.

Provenance

File details

Details for the file dppy-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: dppy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for dppy-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce478a480f9580dd0ffe7ed2717bc0ce1c6d46ce6e6e79508adf23de313d52e3
MD5 00dbbccc9319edf43e530cf205d816d8
BLAKE2b-256 2af2f62410c9bf939e6b637670b4ec3a075eb2be0e09de30b3e7effaf70ea28b

See more details on using hashes here.

Provenance

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