Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

A python package for sampling from determinantal point processes

Project description


A python package for sampling from determinantal point processes. Below are instances of sampling from a bicluster and from a random set of points using pyDPP. Refer to examples and references for more information.

.. raw:: html

<img src="" height="220px">


Usage example:


>>> from pydpp.dpp import DPP
>>> import numpy as np
>>> X = np.random.random((10,10))
>>> dpp = DPP(X)
>>> dpp.compute_kernel(kernel_type = 'rbf', sigma= 0.4) # use 'cos-sim' for cosine similarity
>>> samples = dpp.samples() # samples := [1,7,2,5]
>>> ksamlpes = dpp.sample_k(3) # ksamples := [5,8,0]


To get the project's source code, clone the github repository:


$ git clone
$ cd pyDPP

Create a virtual environment and activate it. [optional]


$ [sudo] pip install virtualenv
$ virtualenv -p python3 venv
$ source venv/bin/activate

Next, install all the dependencies in the environment.


(venv)$ pip install -r requirements.txt

Install the package into the virtual environment.


(venv)$ python install

- Numpy
- Scipy

To run the example jupyter notebook you need install jupyter notebook, sklearn and matplotlib.

The package has been test with python 2.7 and python 3.5.2


- Kulesza, A. and Taskar, B., 2011. k-DPPs: Fixed-size determinantal point processes. In Proceedings of the 28th International Conference on Machine Learning (ICML-11) (pp. 1193-1200). [`paper <>`__]

- Kulesza, A. and Taskar, B., 2012. Determinantal point processes for machine learning. Foundations and Trends® in Machine Learning, 5(2–3), pp.123-286. [`paper <>`__]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pydpp, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size pydpp-0.2.1-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pydpp-0.2.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page