Skip to main content

A python package for sampling from determinantal point processes

Project description

=====
pyDPP
=====

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="https://raw.githubusercontent.com/satwik77/pyDPP/master/example/dpp_selection_k12.png?token=AKhAbS05A3CBgKfXR9P7i4adhlM7Q-whks5b0bhYwA%3D%3D" height="220px">



Usage
-----

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]

Installation
------------

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

::

$ git clone https://github.com/satwik77/pyDPP.git
$ cd pyDPP

Create a virtual environment and activate it. [optional]

::

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

Next, install all the dependencies in the environment.

::

(venv)$ pip install -r requirements.txt


Install the package into the virtual environment.

::

(venv)$ python setup.py install

Requirements
^^^^^^^^^^^^
- Numpy
- Scipy

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

Compatibility
^^^^^^^^^^^^^
The package has been test with python 2.7 and python 3.5.2


Reference
^^^^^^^^^^

- 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 <https://homes.cs.washington.edu/~taskar/pubs/kdpps_icml11.pdf>`__]

- 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 <http://www.alexkulesza.com/pubs/dpps_fnt12.pdf>`__]




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

pydpp-0.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

pydpp-0.2.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pydpp-0.2.1.tar.gz.

File metadata

  • Download URL: pydpp-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2

File hashes

Hashes for pydpp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 feddbba1f37a53f09c266d2189ddb9f6647ab55a7ff2f62d8c58f611d5a5e35f
MD5 78c629a36c4e0e7646f105b9f6f18812
BLAKE2b-256 f61f8329281874b83456d4c8fc6a3f1db4d6094e18d99b6b8a192e1def73f03b

See more details on using hashes here.

File details

Details for the file pydpp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pydpp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2

File hashes

Hashes for pydpp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bad4991691fbb538fb1c3f494410eac399a99e214d5e47d96594e332ec5920a6
MD5 279b3bb1f1dc84d7894e4b58b893d6a8
BLAKE2b-256 ba1ddabe921b95b7067ccdca3c81e330b163d78792adf8799cefbf3dc8bf494e

See more details on using hashes here.

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