Code Monkey home page Code Monkey logo

prediction-flow's Introduction

Build Status

PyPI version

prediction-flow

prediction-flow is a Python package providing modern Deep-Learning based CTR models. Models are implemented by PyTorch.

how to use

  • Install using pip.
pip install prediction-flow

feature

how to define feature

There are two parameters for all feature types, name and column_flow. The name parameter is used to index the column raw data from input data frame. The column_flow parameter is a single transformer of a list of transformers. The transformer is used to pre-process the column data before training the model.

  • dense number feature
Number('age', StandardScaler())
Number('ctr', None)
  • sparse category feature
Category('movieId', CategoryEncoder(min_cnt=1))
  • var length sequence feature
Sequence('genres', SequenceEncoder(sep='|', min_cnt=1))

transformer

The following transformers are provided now.

transformer supported feature type detail
StandardScaler Number Wrapper of scikit-learn's StandardScaler. Null value must be filled in advance.
LogTransformer Number Log scaler. Null value must be filled in advance.
CategoryEncoder Category Converting str value to int. Null value must be filled in advance using '__UNKNOWN__'.
SequenceEncoder Sequence Converting sequence str value to int. Null value must be filled in advance using '__UNKNOWN__'.

model

model reference
DNN -
Wide & Deep [DLRS 2016]Wide & Deep Learning for Recommender Systems
DeepFM [IJCAI 2017]DeepFM: A Factorization-Machine based Neural Network for CTR Prediction
DIN [KDD 2018]Deep Interest Network for Click-Through Rate Prediction
DNN + GRU + GRU + Attention [AAAI 2019]Deep Interest Evolution Network for Click-Through Rate Prediction
DNN + GRU + AIGRU [AAAI 2019]Deep Interest Evolution Network for Click-Through Rate Prediction
DNN + GRU + AGRU [AAAI 2019]Deep Interest Evolution Network for Click-Through Rate Prediction
DNN + GRU + AUGRU [AAAI 2019]Deep Interest Evolution Network for Click-Through Rate Prediction
DIEN [AAAI 2019]Deep Interest Evolution Network for Click-Through Rate Prediction
OTHER TODO

example

movielens-1M

This dataset is just used to test the code can run, accuracy does not make sense.

amazon

accuracy

benchmark

acknowledge and reference

  • Referring the design from DeepCTR, the features are divided into dense (class Number), sparse (class Category), sequence (class Sequence) types.

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.