Giter VIP home page Giter VIP logo

ctrmodel's Introduction

CTRmodel

CTR prediction model based on pure Spark MLlib, no third-party library.

Realized Models

  • Naive Bayes
  • Logistic Regression
  • Factorization Machine
  • Random Forest
  • Gradient Boosted Decision Tree
  • GBDT + LR
  • Neural Network
  • Inner Product Neural Network (IPNN)
  • Outer Product Neural Network (OPNN)

Dataset

A small portion of some public ads database for test and initial debug. You can directly get comparision among different models on metrics such as AUC under ROC and P-R curve.

Data Format

    root
     |-- user_id: integer (user id)
     |-- item_id: integer (item id)
     |-- category_id: integer (item category id)
     |-- content_type: string (item content type)
     |-- timestamp: string (timestamp)
     |-- user_item_click: long (the number of user clicked the item)
     |-- user_item_imp: double (the number of user watched the item)
     |-- item_ctr: double (historical CTR of the item)
     |-- is_new_user: integer (is the user a new user)
     |-- user_embedding: array (embedding of the user)
     |    |-- element: double
     |-- item_embedding: array (embedding of the item)
     |    |-- element: double
     |-- label: integer (label of the sample 0-negative 1-positive)

Usage

It's a maven project. Spark version is 2.3.0. Scala version is 2.11.
After dependencies are imported by maven automatically, you can simple run the example function (com.ggstar.example.ModelSelection) to train all the CTR models and get the metrics comparison among all the models.

Related Papers on CTR prediction

Other Resources

ctrmodel's People

Contributors

wzhe06 avatar

Watchers

James Cloos avatar  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.