Git Product home page Git Product logo

mimn's Introduction

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

  • Python 2.x
  • Tensorflow 1.4

Data

Getting Started

First we need to prepare data.

Amazon Prepare

  • You can get the raw Amazon data prepared
sh prepare_amazon.sh
  • Because getting and processing the data is time consuming,we had processed Amazon data and upload it for you.
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:

  • DNN
  • PNN
  • DIN
  • GRU4REC
  • ARNN
  • RUM
  • DIEN
  • DIEN_with_neg

MIMN

You can train MIMN with different parameter setting:

  • MIMN Basic
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 0 --util_reg 0
  • MIMN with Memory Utilization Regularization
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 0 --util_reg 1
  • MIMN with Memory Utilization Regularization and Memory Induction Unit
python script/train_taobao.py -p train --random_seed 19 --model_type MIMN --memory_size 4 --mem_induction 1 --util_reg 1
  • MIMN with Auxiliary Loss
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

mimn's People

Contributors

rocket-launching avatar uic-paper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.