/torecsys

ToR[e]cSys is a package which implementing famous recommendation system algorithm in PyTorch, including Click-through-rate prediction, Learning-to-ranking, or embedding.

Primary LanguagePythonMIT LicenseMIT

ToR[e]cSys


ToR[e]cSys is a Python package which implementing famous recommendation system
algorithm in PyTorch, including Click-through-rate prediction, Learning-to-ranking,
and Items Embedding.

Installation

By pip package

pip install torecsys

From source

git clone https://github.com/p768lwy3/torecsys.git
python setup.py build
python setup.py install

Build Documentation

git clone https://github.com/p768lwy3/torecsys.git
cd ./torecsys/doc
./make html

Documentation

The complete documentation for ToR[e]cSys is avaiable via ReadTheDocs website.
Thank you for ReadTheDocs!!!

Implemented Models

Model Name Research Paper Type
Attentional Factorization Machine Jun Xiao et al, 2017. Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks Click Through Rate
Deep and Cross Network Ruoxi Wang et al, 2017. Deep & Cross Network for Ad Click Predictions Click Through Rate
Deep Field-Aware Factorization Machine Junlin Zhang et al, 2019. FAT-DeepFFM: Field Attentive Deep Field-aware Factorization Machine Click Through Rate
Deep Factorization Machine Huifeng Guo et al, 2017. DeepFM: A Factorization-Machine based Neural Network for CTR Prediction Click Through Rate
Deep Matching Correlation Prediction Wentao Ouyang et al, 2019. Representation Learning-Assisted Click-Through Rate Prediction Click Through Rate
Elaborated Entire Space Supervised Multi Task Model Hong Wen et al, 2019. Conversion Rate Prediction via Post-Click Behaviour Modeling Click Through Rate
Entire Space Multi Task Model Xiao Ma et al, 2019. Entire Space Multi-Task Model: An Effective Approach for Estimating Post-Click Conversion Rate Click Through Rate
Factorization Machine Steffen Rendle, 2010. Factorization Machine Click Through Rate
Factorization Machine Support Neural Network Weinan Zhang et al, 2016. Deep Learning over Multi-field Categorical Data: A Case Study on User Response Prediction Click Through Rate
Field Attentive Deep Field Aware Factorization Machine Junlin Zhang et al, 2019. FAT-DeepFFM: Field Attentive Deep Field-aware Factorization Machine Click Through Rate
Field-Aware Factorization Machine Yuchin Juan et al, 2016. Field-aware Factorization Machines for CTR Prediction Click Through Rate
Logistic Regression / Click Through Rate
Neural Collaborative Filtering Xiangnan He, 2017. Neural Collaborative Filtering Click Through Rate
Neural Factorization Machine Xiangnan He et al, 2017. Neural Factorization Machines for Sparse Predictive Analytics Click Through Rate
Product Neural Network Yanru QU, 2016. Product-based Neural Networks for User Response Prediction Click Through Rate
eXtreme Deep Factorization Machine Jianxun Lian et al, 2018. xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems Click Through Rate
Matrix Factorization / Embedding
Starspace Ledell Wu et al, 2017 StarSpace: Embed All The Things! Embedding

More About ToR[e]cSys

Component Description
[torecsys.data] download sample data, build dataloader, and other functions for convenience
[torecsys.estimators] models with embedding, which can be trained with .fit(dataloader) directly
[torecsys.functional] functions used in recommendation system
[torecsys.inputs] inputs' functions, including embedding, image transformations
[torecsys.layers] layers-level implementation of algorithms
[torecsys.losses] loss functions used in recommendation system
[torecsys.metrics] metrics to evaluate recommendation system
[torecsys.models] whole-architecture of models which can be trained by torecsys.base.trainer
[torecsys.utils] little tools used in torecsys

(!!! To be confirmed)

torecsys.models

torecsys.models is a part of model excluding embedding part, so you can choose
a suitable embedding method for your model with the following codes:

torecsys.estimators

torecsys.estimators is another type of model to be used directly if the input
fields and features implemented in the papers are suitable for you:

Getting Started

(!!! To be confirmed)

Load Sample data

load the movielens dataset, for example:

Build Dataset and DataLoader with Sample data

Use Estimators to train a model

Make prediction with estimators

Examples

Authors

License

ToR[e]cSys is MIT-style licensed, as found in the LICENSE file.