Models associated with the article: Blanchard, Simon J., Tatiana Dyachenko, Keri L. Kettle (2020). "Locational Choices: Modeling Consumer Preferences for Proximity to Others at Reserved-Seating Venues." Journal of Marketing Research [PDF].
From dataset of seat maps with various occupancy, we learn to predict individual preferences for seating locations. We do so via a Bayesian model and CNN codes. We provide experimental data (panel participants) but the code works on real data as well.
Sample task:
In the folder PS, we provide the R codes of our Bayesian statistical model for the analysis of locational choice data. Two R functions and a DLL are provided.
In the folder CNN_Benchmarks, we provide a naive implementation of covolutional neural networks (trained with adam) on the same data. The code was developed by Theo Moins. Taking a training file and holdout file as input, it outputs holdout predictive accuracy (top1, top5).
The datasets were collected via Seatmaplab.com.
For each set of analysis with CNNs, we generated a training (in-sample) and a holdout file. The characteristics of each dataset are described in more detail in Appendix A in the paper. Datasets, the raw outputs from seatmaplab and the R files to generate the training and holdout files can downloaded from the zip archives here.
We provide three files:
- FUN_PS_LPSreg_het_Cpp_withCov_diffNumCh.r
- FUN_PS_LPSreg_het_Cpp_withCov_diffNumCh_predictive.R
- PS_locational_wCov_noLambda_20180625.dll
bayesm and Rcpp are required. When using the functions, these three files are assumed to the in the working directory along with the data (see zip archives for sample usage and data processing).
We provide a Jupyter notebook. It requires Torch, numpy, csv, and pyplot. It requires a training and holdout csv file, available here (see CNN files column).