Home

Awesome

Practice on Long Sequential User Behavior Modeling for Click-Through Rate Prediction

Implementation of Practice on Long Sequential User Behavior Modeling for Click-Through Rate Prediction using tensorflow

Prerequisites

Data

Getting Started

First we need to prepare data.<br/>

Amazon Prepare

sh prepare_amazon.sh
sh prepare_ready_data.sh

Taobao Prepare

First download Taobao Data to get "UserBehavior.csv.zip", then execute the following command.

sh prepare_taobao.sh

Running

usage: train_book.py|train_taobao.py  [-h] [-p TRAIN|TEST] [--random_seed RANDOM_SEED]
                     [--model_type MODEL_TYPE] [--memory_size MEMORY_SIZE]
                     [--mem_induction MEM_INDUCTION]
                     [--util_reg UTIL_REG]

Base Model

The example for DNN

python script/train_book.py -p train --random_seed 19 --model_type DNN
python script/train_book.py -p test --random_seed 19 --model_type DNN

The model below had been supported:

MIMN

You can train MIMN with different parameter setting:<br/>

python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 0 --util_reg 0
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 0 --util_reg 1
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 1 --util_reg 1
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN_with_neg --memory_size 4 --mem_induction 0 --util_reg 0

If you want to train Amazon Data, you just need replace above train_taobao.py to train_book.py