The Most Complete PyTorch Implementation of "Deep Interest Network for Click-Through Rate Prediction"
This is an unofficial PyTorch implementation of the CTR model DIN with full training and testing pipeline. The model achieved 0.80 AUC score on Amazon(Books) dataset without any parameter / hyperparameter tuning.
User | Goods | Categories | |
---|---|---|---|
Amazon (Books) | 543060 | 367983 | 1601 |
You can download the processed Amazon(Books) dataset from dien or Google Drive. Unzip them and move all files to the "data/" folder.
tar -jxvf data.tar.gz
...
The "data" folder should have the following files.
- cat_voc.pkl
- mid_voc.pkl
- uid_voc.pkl
- local_train_splitByUser
- local_test_splitByUser
- reviews-info
- item-info
python din/train.py --mode train --ep 5
python din/train.py --mode test --model_path path/of/the/model
Model | Eemb dim | total params | AUC | download |
---|---|---|---|---|
DIN-Dice | 12 | 11001305 | 0.80 | ckpt |
Some code is adapted from dien and DIN-pytorch. Thanks for their great work.