Skip to content

The Most Complete PyTorch Implementation of "Deep Interest Network for Click-Through Rate Prediction"

License

Notifications You must be signed in to change notification settings

yeyingdege/ctr-din-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Most Complete PyTorch Implementation of "Deep Interest Network for Click-Through Rate Prediction"

LICENSE Python PyTorch

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.

Dataset

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

Train and test

python din/train.py --mode train --ep 5
python din/train.py --mode test --model_path path/of/the/model

Model Zoo

Model Eemb dim total params AUC download
DIN-Dice 12 11001305 0.80 ckpt

Acknowledgement

Some code is adapted from dien and DIN-pytorch. Thanks for their great work.

About

The Most Complete PyTorch Implementation of "Deep Interest Network for Click-Through Rate Prediction"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published