pf
prediction-flow
pypi i prediction-flow
pf

prediction-flow

Deep-Learning based CTR models implemented by PyTorch

by Hongwei Zhang

0.1.5 (see all)License:MIT
pypi i prediction-flow
Readme

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.

transformersupported feature typedetail
StandardScalerNumberWrapper of scikit-learn's StandardScaler. Null value must be filled in advance.
LogTransformerNumberLog scaler. Null value must be filled in advance.
CategoryEncoderCategoryConverting str value to int. Null value must be filled in advance using '__UNKNOWN__'.
SequenceEncoderSequenceConverting sequence str value to int. Null value must be filled in advance using '__UNKNOWN__'.

model

modelreference
DNN-
Wide & Deep[DLRS 2016][Wide & Deep Learning for Recommender Systems](https://arxiv.org/pdf/1606.07792.pdf)
DeepFM[IJCAI 2017][DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](http://www.ijcai.org/proceedings/2017/0239.pdf)
DIN[KDD 2018][Deep Interest Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1706.06978.pdf)
DNN + GRU + GRU + Attention[AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)
DNN + GRU + AIGRU[AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)
DNN + GRU + AGRU[AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)
DNN + GRU + AUGRU[AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)
DIEN[AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)
OTHERTODO

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.

GitHub Stars

188

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

3

OPEN PRs

0
VersionTagPublished
0.1.5
1yr ago
0.1.4
2yrs ago
0.1.3
3yrs ago
0.1.2
3yrs ago
No alternatives found
No tutorials found
Add a tutorial