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.
>>> 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]
Refer to examples/test-dpp.ipynb for more on usage.
$ pip install -U pydpp
To get the project's source code, clone the github repository:
$ git clone https://github.com/satwik77/pyDPP.git
$ cd pyDPP
Install VirtualEnv using the following (optional):
$ [sudo] pip install virtualenv
Create and activate your virtual environment (optional):
$ virtualenv venv
$ source venv/bin/activate
Install all the required packages:
$ pip install -r requirements.txt
Install the package by running the following command from the root directory of the repository:
$ python setup.py install
- Numpy
- Scipy
The package has been tested 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]