DPPy is a Python library for exact and approximate sampling of Determinantal Point Processes.
Project description
“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.4+.
Dependencies
This project depends on the following libraries, which are automatically downloaded during installation:
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++
Download instructions
DPPy is now available on PyPI
pip install dppy
However you may not work with the latest version, so
If you have a GitHub account
Please consider forking DPPy
Use git to clone your copy of the repo
cd <directory_of_your_choice> git clone https://github.com/<username>/DPPy.git
If you only use git, clone this repository
cd <directory_of_your_choice> git clone https://github.com/guilgautier/DPPy.git
Otherwise simply dowload the project
In any case, install the project with
cd DPPy pip install .
How to use it
To avoid duplicating the docs, the entire DPPy documentation is in read the docs in the following link http://dppy.readthedocs.io/. There are also some interactive tutorials using Jupyter in here 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!
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 Sphinx
pip install -U sphinx
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.
The companion paper is available on
If you use this package, please consider citing it with this piece of BibTeX:
@article{GPBV19,
archivePrefix = {arXiv},
arxivId = {1809.07258},
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), in press},
title = {{DPPy: DPP Sampling with Python}},
keywords = {Computer Science - Machine Learning, Computer Science - Mathematical Software, Statistics - Machine Learning},
url = {http://arxiv.org/abs/1809.07258},
year = {2019},
note = {Code at http://github.com/guilgautier/DPPy/ Documentation at http://dppy.readthedocs.io/}
}
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dppy-0.3.0.tar.gz
.
File metadata
- Download URL: dppy-0.3.0.tar.gz
- Upload date:
- Size: 65.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | feace1c6568f0db4d1331e55aaa3a6206a15377f2dcfbf2dd64c8ba64a6ea532 |
|
MD5 | 4491e3377cac483a4b9d26bae0c6a14d |
|
BLAKE2b-256 | e242f8ca704b2240534a119423557e8feca56326900e0fc2e44e84d2accd73da |
Provenance
File details
Details for the file dppy-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: dppy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 67.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5ac2c34bad43beecc8bc0fed06411da2a251cfc7e11cc8e726853486c3203f |
|
MD5 | 9451dd74556b55123a8ca67049951fd6 |
|
BLAKE2b-256 | c193a93ab5b3d7e02797674a7418fe5d3398ba6d7550081c3fa894f18274da25 |