This is the code used in the paper "Entity Embeddings of Categorical Variables" The original version of the code used for the kaggle competition is in the kaggle branch.
To run the code one needs first download and unzip the train.csv
and store.csv
files on Kaggle and put them inside this folder.
The following packages is need if you want to recover the result in the paper (we used python 3):
pip3 install -U scikit-learn
pip3 install -U xgboost
pip3 install -U keras
Please refer to Keras for more details for isntalling keras.
Next run the following scripts to extract csv files and prepare features:
python3 extract_csv_files.py
python3 prepare_features.py
To run the models:
python3 train_test_model.py
You can anaylize the embeddings with the ipython notebook included. This is the learned embeeding of German States printed in 2D:
and this is the learned embeddings of 1115 Rossmann stores printed in 3D:
Acknowledge:
Thank our founder Ozel Christo, Andrei Ciobotar and all colleagues at Neokami for supporting and encouragement!