The code in this repo implements Shopper, the model in the paper:
- Francisco J. R. Ruiz, Susan Athey, David M. Blei. SHOPPER: A Probabilistic Model of Consumer Choice with Substitutes and Complements. ArXiv 1711.03560. 2017.
Please cite this paper if you use this software.
Shopper is a model of consumer choice that posits a mean utility for each basket t
and item c
,
where the baseline psi_{tc}
is
For details on the model, please see the paper.
The code is implemented in C++/CUDA and it requires a GPU to run. It also uses multithreading to speed up computations.
You can compile the code from a terminal using this line:
nvcc -std=c++11 -o shopper src/emb.cu `gsl-config --cflags --libs`
Requirements.
-
GCC 5.0 or earlier. (It has been tested with GCC 4.8.5.)
-
CUDA 8.0.
-
The GSL library.
-
The CTPL thread pool library by Vitaliy Vitsentiy. It is included in this repo, so you do not need to download anything.