This code is the official implementation of Lazy and Fast Greedy MAP Inference for Determinantal Point Process.
- CMake (version ≧ 3.23)
- pkg-config
- GNU Make or Ninja
- C++ Compiler (GNU Compiler Collection (GCC) / Clang / ...) compatible to C++17
- GCC: version 7.1 or later
- Clang: version 5.0 or later
When first cloning this repository, run the following commands:
git submodule init
git submodule updateTo compile C++ codes, run:
cmake --preset make # replace "make" with "ninja" if you use Ninja
cmake --build --preset releaseTo generate the input data used in the experiment, follow these steps.
The resulting data will be stored to data/.
To generate synthetic data, run the following:
./build/gen_wishartTo pre-process the real world datasets, Please follow these steps:
To get the primary data of MovieLens 25M dataset, run the following commands:
mkdir -p data
wget -P data https://files.grouplens.org/datasets/movielens/ml-25m.zip
unzip data/ml-25m.zip -d data
./build/pre_process -d movie_lensTo get Netflix Prize dataset, you need a Kaggle account.
Logging to Kaggle, download archive.zip from here and store it to data/.
For pre-processing, run the following commands.
mkdir -p data
unzip data/archive.zip -d data/netflix_raw
./build/pre_process -d netflixThe matrix
./build/product -d netflix
./build/product -d movie_lensRun commands on the root directory.
./build/exp -a [algorithm] -d [dataset_name] -m [input_matrix]algorithm: greedy (default), random, stochastic, interlacedataset_name: wishart, wishart_fixed_k, movie_lens, netflixinput_matrix: B (default), L
./build/double -d [dataset_name]dataset_name: wishart, movie_lens, netflix
Experimental results will be stored to result/ in the CSV format.
The code is licensed MIT.