All Projects → hongleizhang → Rsalgorithms

hongleizhang / Rsalgorithms

Some algorithms about traditional and social recommendation.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rsalgorithms

Summary Of Recommender System Papers
阅读过的推荐系统论文的归类总结,持续更新中…
Stars: ✭ 288 (-42.4%)
Mutual labels:  recommender-system
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (-34.8%)
Mutual labels:  recommender-system
Sasrec
SASRec: Self-Attentive Sequential Recommendation
Stars: ✭ 373 (-25.4%)
Mutual labels:  recommender-system
Recdb Postgresql
RecDB is a recommendation engine built entirely inside PostgreSQL
Stars: ✭ 297 (-40.6%)
Mutual labels:  recommender-system
Recommendation Systems Paperlist
Papers about recommendation systems that I am interested in
Stars: ✭ 308 (-38.4%)
Mutual labels:  recommender-system
Product Nets
Tensorflow implementation of Product-based Neural Networks. An extended version is at https://github.com/Atomu2014/product-nets-distributed.
Stars: ✭ 355 (-29%)
Mutual labels:  recommender-system
ds3-spring-2018
Материалы третьего набора офлайн-программы Data Scientist.
Stars: ✭ 22 (-95.6%)
Mutual labels:  recommender-system
Recsim
A Configurable Recommender Systems Simulation Platform
Stars: ✭ 461 (-7.8%)
Mutual labels:  recommender-system
Winerama Recommender Tutorial
A wine recommender system tutorial using Python technologies such as Django, Pandas, or Scikit-learn, and others such as Bootstrap.
Stars: ✭ 324 (-35.2%)
Mutual labels:  recommender-system
Attentional factorization machine
TensorFlow Implementation of Attentional Factorization Machine
Stars: ✭ 362 (-27.6%)
Mutual labels:  recommender-system
Ad Papers
Papers on Computational Advertising
Stars: ✭ 3,515 (+603%)
Mutual labels:  recommender-system
Recsys
项亮的《推荐系统实践》的代码实现
Stars: ✭ 306 (-38.8%)
Mutual labels:  recommender-system
Lightfm
A Python implementation of LightFM, a hybrid recommendation algorithm.
Stars: ✭ 3,884 (+676.8%)
Mutual labels:  recommender-system
Dsin
Code for the IJCAI'19 paper "Deep Session Interest Network for Click-Through Rate Prediction"
Stars: ✭ 289 (-42.2%)
Mutual labels:  recommender-system
Openlearning4deeprecsys
Some deep learning based recsys for open learning.
Stars: ✭ 383 (-23.4%)
Mutual labels:  recommender-system
Daisyrec
A developing recommender system in pytorch. Algorithm: KNN, LFM, SLIM, NeuMF, FM, DeepFM, VAE and so on, which aims to fair comparison for recommender system benchmarks
Stars: ✭ 280 (-44%)
Mutual labels:  recommender-system
Rspapers
A Curated List of Must-read Papers on Recommender System.
Stars: ✭ 4,140 (+728%)
Mutual labels:  recommender-system
Buffalo
TOROS Buffalo: A fast and scalable production-ready open source project for recommender systems
Stars: ✭ 498 (-0.4%)
Mutual labels:  recommender-system
Neural factorization machine
TenforFlow Implementation of Neural Factorization Machine
Stars: ✭ 422 (-15.6%)
Mutual labels:  recommender-system
Recnn
Reinforced Recommendation toolkit built around pytorch 1.7
Stars: ✭ 362 (-27.6%)
Mutual labels:  recommender-system

Recommender System Suits: An open source toolkit for recommender system

This repository provides a set of classical traditional recommendation methods which make predictions only using rating data and social recommendation methods which utilize trust/social information in order to alleviate the sparsity of ratings data. Besides, we have collected some classical methods implemented by others for your convenience.

Traditional recommendation

  • UserCF[Resnick et al. 1994]

Resnick, Paul, et al. "GroupLens: an open architecture for collaborative filtering of netnews." Proceedings of the 1994 ACM conference on Computer supported cooperative work. ACM, 1994.

  • ItemCF[Sarwar et al. 2001]

Sarwar, Badrul, et al. "Item-based collaborative filtering recommendation algorithms." Proceedings of the 10th international conference on World Wide Web. ACM, 2001.

  • FunkSVD[Simon Funk. 2006]

http://sifter.org/~simon/journal/20061211.html

  • PMF[Salakhutdinov. 2008]

Mnih, Andriy, and Ruslan R. Salakhutdinov. "Probabilistic matrix factorization." Advances in neural information processing systems (2008): 1257-1264.

  • IntegSVD[Koren et al. 2008]

Koren, Yehuda. "Factorization meets the neighborhood: a multifaceted collaborative filtering model." Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2008.

  • BiasSVD[Koren et al. 2009]

Koren, Yehuda, Robert Bell, and Chris Volinsky. "Matrix factorization techniques for recommender systems." Computer 42.8 (2009).

  • SVD++[Koren et al. 2010]

Koren, Yehuda. "Factor in the neighbors: Scalable and accurate collaborative filtering." ACM Transactions on Knowledge Discovery from Data (TKDD) 4.1 (2010): 1.

Social recommendation

  • SocialRec[Ma et al. 2008]

Ma, Hao, et al. "Sorec: social recommendation using probabilistic matrix factorization." Proceedings of the 17th ACM conference on Information and knowledge management. ACM, 2008.

  • RSTE[Ma et al. 2009]

Ma, Hao, Irwin King, and Michael R. Lyu. "Learning to recommend with social trust ensemble." Proceedings of the 32nd international ACM SIGIR conference on Research and development in information retrieval. ACM, 2009.

  • TrustWalker[Jamali and Ester. 2009]

Jamali, Mohsen, and Martin Ester. "Trustwalker: a random walk model for combining trust-based and item-based recommendation." Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2009.

  • SocialMF[Jamali and Ester 2010]

Jamali, Mohsen, and Martin Ester. "A matrix factorization technique with trust propagation for recommendation in social networks." Proceedings of the fourth ACM conference on Recommender systems. ACM, 2010.

  • SocialReg[Ma et al. 2011]

Ma, Hao, et al. "Recommender systems with social regularization." Proceedings of the fourth ACM international conference on Web search and data mining. ACM, 2011.

  • TrustSVD[Guo et al. 2015]

Guo, Guibing, Jie Zhang, and Neil Yorke-Smith. "TrustSVD: Collaborative Filtering with Both the Explicit and Implicit Influence of User Trust and of Item Ratings." AAAI. Vol. 15. 2015.

  • CUNE[Zhang et al. 2017]

Chuxu Zhang, Lu Yu, Yan Wang, Chirag Shah, Xiangliang Zhang. "Collaborative User Network Embedding for Social Recommender Systems." SDM, 2017.

RSAlgorithms implemented by Others

Sedhain et al. "Autorec: Autoencoders meet collaborative filtering." WWW, 2015. code

Kim et al. "Convolutional matrix factorization for document context-aware recommendation." RecSys, 2016. code

Liang et al. "Factorization meets the item embedding: Regularizing matrix factorization with item co-occurrence." RecSys, 2016. code

He et al. "Fast matrix factorization for online recommendation with implicit feedback." SIGIR, 2016. code

Quadrana et al. "Personalizing session-based recommendations with hierarchical recurrent neural networks." RecSys, 2017. code

He et al. "Neural collaborative filtering." WWW, 2017. code

Ebesu et al. "Collaborative Memory Network for Recommendation Systems." SIGIR, 2018. code

Fan et al. "Graph Neural Networks for Social Recommendation." WWW, 2019. code

Chong et al. "Efficient Heterogeneous Collaborative Filtering without Negative Sampling for Recommendation." AAAI, 2020. code

Requirements

  • numpy==1.14.2
  • scipy==1.0.1
  • pandas==0.22.0
  • matplotlib==2.2.2

Code Structure

The structure of our project is presented in a tree form as follows:

Recommender System  # the root of project
│   README.md
│   __init__.py
│   .gitignore
|
└───configx  # configurate the global parameters and hyper parameters
│   │   configx.py   
|   │   
└───data  # store the rating and social data
│   │   ft_ratings.txt
|   │   ft_trust.txt
|   |
│   └───cv  # cross validation data
│       │   ft-0.txt
│       │   ft-1.txt
│       │   ft-2.txt
│       │   ft-3.txt
│       │   ft-4.txt
|       |
└───metrics  # the metrics to measure the prediction accuracy for rating prediction task
│   │   metric.py
|   |
└───model  # the set of methods of tranditional and social recommendation
│   │   bias_svd.py
│   │   funk_svd.py
│   │   pmf.py
│   │   integ_svd.py
|   |   item_cf.py
|   |   item_cf_big.py
|   |   mf.py
|   |   social_mf.py
|   |   social_rec.py
|   |   social_reg.py
|   |   social_rste.py
|   |   svd++.py
|   |   trust_svd.py
|   |   trust_walker.py
|   |   user_cf.py
|   |
└───reader  # data generator for rating and social data
│   │   rating.py
│   │   trust.py
|   |
└───utility  # other commonly used tools
    │   cross_validation.py
    │   data_prepro.py
    │   data_statistics.py
    │   draw_figure.py
    │   matrix.py
    │   similarity.py
    │   tools.py
    │   util.py

Parameters Settings

If you want to change the default hyparameters, you can set it in configx.py. The meanings of the hyparameters is as follows:

Dataset Parameters

dataset_name: the short name of dataset, the default value is ft.

k_fold_num: the num of cross validation, the default value is 5.

rating_path: the path of raw ratings data file, the default value is ../data/ft_ratings.txt.

rating_cv_path: the cross validation path of ratings data, the default value is ../data/cv/.

trust_path: the path of raw trust data file, the default value is ../data/ft_trust.txt.

sep: the separator of rating and trust data in triple tuple, the default value is .

random_state: the seed of random number, the default value is 0.

size: the ratio of train set, the default value is 0.8.

min_val: the minimum rating value, the default value is 0.5.

max_val: the maximum rating value, the default value is 4.0.

Model HyperParameters

coldUserRating: the number of ratings a cold start user rated on items, the default value is 5.

factor: the size of latent dimension for user and item, the default value is 10.

threshold: the threshold value of model training, the default value is 1e-4.

lr: the learning rate, the default value is 0.01.

maxIter: the maximum number of iterations, the default value is 100.

lambdaP: the parameter of user regularizer, the default value is 0.001.

lambdaQ: the parameter of item regularizer, the default value is 0.001.

gamma: momentum coefficient, the default value is 0.9.

isEarlyStopping: early stopping flag, the default value is false.

Output Parameters

result_path: the main directory of results, the default value is ../results/.

model_path: the directory of well-trained variables, the default value is ../results/model/.

result_log_path: the directory of logs when training models, the default value is ../results/log/.

Usage

Next, I will take pmf as an example to introduce how to execute our code.

First, we should split our rating data into several parts for training, testing and cross validation.

from utility.cross_validation import split_5_folds
from configx.configx import ConfigX

if __name__ == "__main__":
    configx = ConfigX()
    configx.k_fold_num = 5 
    configx.rating_path = "../data/ft_ratings.txt"
    configx.rating_cv_path = "../data/cv/"
    
    split_5_folds(configx)

Next, we open the pmf.py file in model folder, and configure the hyperparameters for training and execute the following code:

if __name__ == '__main__':

    rmses = []
    maes = []
    bmf = FunkSVDwithR()
    for i in range(bmf.config.k_fold_num):
        bmf.train_model(i)
        rmse, mae = bmf.predict_model()
        print("current best rmse is %0.5f, mae is %0.5f" % (rmse, mae))
        rmses.append(rmse)
        maes.append(mae)
    rmse_avg = sum(rmses) / 5
    mae_avg = sum(maes) / 5
    print("the rmses are %s" % rmses)
    print("the maes are %s" % maes)
    print("the average of rmses is %s " % rmse_avg)
    print("the average of maes is %s " % mae_avg)

RSPapers

Recently, we have launched an open source project RSPapers, which includes some classical Surveys, Classical Recommender System, Social Recommender System, Deep Learning based Recommender System, Cold Start Problem in Recommender System and POI Recommender System.

Acknowledgements

Specially summerize the Traditional and Social recommendations for you, and if you have any questions, please contact me generously. Last but not least, I sincerely look forward to working with you to contribute it.

Greatly thank @yunzhan2014 for making contributions to it.

My ZhiHu: Honglei Zhang

My Gmail: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].