Coder Social home page Coder Social logo

coder-yu / qrec Goto Github PK

View Code? Open in Web Editor NEW
1.6K 69.0 404.0 18.44 MB

QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)

Python 100.00%
recommender-system social-recommendation deep-learning tensorflow algorithm

qrec's Introduction

logo

GitHub last commit

Introduction

QRec is a Python framework for recommender systems (Supported by Python 3.7.4 and Tensorflow 1.14+) in which a number of influential and newly state-of-the-art recommendation models are implemented. QRec has a lightweight architecture and provides user-friendly interfaces. It can facilitate model implementation and evaluation.
Founder and principal contributor: @Coder-Yu
Other contributors: @DouTong @Niki666 @HuXiLiFeng @BigPowerZ @flyxu
Supported by: @AIhongzhi (A/Prof. Hongzhi Yin, UQ), @mingaoo (A/Prof. Min Gao, CQU)

We also provide Pytorch implementations of some models in another library. Please click here

What's New

31/03/2022 - SimGCL proposed in our SIGIR'22 paper has been added.
12/10/2021 - BUIR proposed in SIGIR'21 paper has been added.
30/07/2021 - We have transplanted QRec from py2 to py3.
07/06/2021 - SEPT proposed in our KDD'21 paper has been added.
16/05/2021 - SGL proposed in SIGIR'21 paper has been added.
16/01/2021 - MHCN proposed in our WWW'21 paper has been added.
22/09/2020 - DiffNet proposed in SIGIR'19 has been added.
19/09/2020 - DHCF proposed in KDD'20 has been added.
29/07/2020 - ESRF proposed in my TKDE paper has been added.
23/07/2020 - LightGCN proposed in SIGIR'20 has been added.
17/09/2019 - NGCF proposed in SIGIR'19 has been added.
13/08/2019 - RSGAN proposed in ICDM'19 has been added.
09/08/2019 - Our paper is accepted as full research paper by ICDM'19.
20/02/2019 - IRGAN proposed in SIGIR'17 has been added.
12/02/2019 - CFGAN proposed in CIKM'18 has been added.

Architecture

QRec Architecture

Workflow

QRec Architecture

Features

  • Cross-platform: QRec can be easily deployed and executed in any platforms, including MS Windows, Linux and Mac OS.
  • Fast execution: QRec is based on Numpy, Tensorflow and some lightweight structures, which make it run fast.
  • Easy configuration: QRec configs recommenders with a configuration file and provides multiple evaluation protocols.
  • Easy expansion: QRec provides a set of well-designed recommendation interfaces by which new algorithms can be easily implemented.

Requirements

  • gensim==4.1.2
  • joblib==1.1.0
  • mkl==2022.0.0
  • mkl_service==2.4.0
  • networkx==2.6.2
  • numba==0.53.1
  • numpy==1.20.3
  • scipy==1.6.2
  • tensorflow==1.14.0

Usage

There are two ways to run the recommendation models in QRec:

  • 1.Configure the xx.conf file in the directory named config. (xx is the name of the model you want to run)
  • 2.Run main.py.

Or

  • Follow the codes in snippet.py.

For more details, we refer you to the handbook of QRec.

Configuration

Essential Options

Entry Example Description
ratings D:/MovieLens/100K.txt Set the file path of the dataset. Format: each row separated by empty, tab or comma symbol.
social D:/MovieLens/trusts.txt Set the file path of the social dataset. Format: each row separated by empty, tab or comma symbol.
ratings.setup -columns 0 1 2 -columns: (user, item, rating) columns of rating data are used.
social.setup -columns 0 1 2 -columns: (trustor, trustee, weight) columns of social data are used.
mode.name UserKNN name of the recommendation model.
evaluation.setup -testSet ./dataset/test.txt Main option: -testSet, -ap, -cv (choose one of them)
-testSet path/to/test/file (need to specify the test set manually)
-ap ratio (ap means that the ratings are automatically partitioned into training set and test set, the number is the ratio of the test set. e.g. -ap 0.2)
-cv k (-cv means cross validation, k is the number of the fold. e.g. -cv 5)
-predict path/to/user list/file (predict for a given list of users without evaluation; need to mannually specify the user list file (each line presents a user))
Secondary option:-b, -p, -cold, -tf, -val (multiple choices)
-val ratio (model test would be conducted on the validation set which is generated by randomly sampling the training dataset with the given ratio.)
-b thres (binarizing the rating values. Ratings equal or greater than thres will be changed into 1, and ratings lower than thres will be left out. e.g. -b 3.0)
-p (if this option is added, the cross validation wll be executed parallelly, otherwise executed one by one)
-tf (model training will be conducted on TensorFlow (only applicable and needed for shallow models))
-cold thres (evaluation on cold-start users; users in the training set with rated items more than thres will be removed from the test set)
item.ranking off -topN -1 Main option: whether to do item ranking
-topN N1,N2,N3...: the length of the recommendation list. *QRec can generate multiple evaluation results for different N at the same time
output.setup on -dir ./Results/ Main option: whether to output recommendation results
-dir path: the directory path of output results.

Memory-based Options

similarity pcc/cos Set the similarity method to use. Options: PCC, COS;
num.neighbors 30 Set the number of neighbors used for KNN-based algorithms such as UserKNN, ItemKNN.

Model-based Options

num.factors 5/10/20/number Set the number of latent factors
num.max.epoch 100/200/number Set the maximum number of epoch for iterative recommendation algorithms.
learnRate -init 0.01 -max 1 -init initial learning rate for iterative recommendation algorithms;
-max: maximum learning rate (default 1);
reg.lambda -u 0.05 -i 0.05 -b 0.1 -s 0.1 -u: user regularizaiton; -i: item regularization; -b: bias regularizaiton; -s: social regularization

Implement Your Model

  • 1.Make your new algorithm generalize the proper base class.
  • 2.Reimplement some of the following functions as needed.
          - readConfiguration()
          - printAlgorConfig()
          - initModel()
          - trainModel()
          - saveModel()
          - loadModel()
          - predictForRanking()
          - predict()

For more details, we refer you to the handbook of QRec.

Implemented Algorithms

       
Rating prediction Paper
SlopeOne Lemire and Maclachlan, Slope One Predictors for Online Rating-Based Collaborative Filtering, SDM'05.
PMF Salakhutdinov and Mnih, Probabilistic Matrix Factorization, NIPS'08.
SoRec Ma et al., SoRec: Social Recommendation Using Probabilistic Matrix Factorization, SIGIR'08.
SVD++ Koren, Factorization meets the neighborhood: a multifaceted collaborative filtering model, SIGKDD'08.
RSTE Ma et al., Learning to Recommend with Social Trust Ensemble, SIGIR'09.
SVD Y. Koren, Collaborative Filtering with Temporal Dynamics, SIGKDD'09.
SocialMF Jamali and Ester, A Matrix Factorization Technique with Trust Propagation for Recommendation in Social Networks, RecSys'10.
EE Khoshneshin et al., Collaborative Filtering via Euclidean Embedding, RecSys'10.
SoReg Ma et al., Recommender systems with social regularization, WSDM'11.
LOCABAL Tang, Jiliang, et al. Exploiting local and global social context for recommendation, AAAI'13.
SREELi et al., Social Recommendation Using Euclidean embedding, IJCNN'17.
CUNE-MFZhang et al., Collaborative User Network Embedding for Social Recommender Systems, SDM'17.

                       
Item Ranking Paper
BPR Rendle et al., BPR: Bayesian Personalized Ranking from Implicit Feedback, UAI'09.
WRMFYifan Hu et al.Collaborative Filtering for Implicit Feedback Datasets, KDD'09.
SBPR Zhao et al., Leveraing Social Connections to Improve Personalized Ranking for Collaborative Filtering, CIKM'14
ExpoMF Liang et al., Modeling User Exposure in Recommendation, WWW''16.
CoFactor Liang et al., Factorization Meets the Item Embedding: Regularizing Matrix Factorization with Item Co-occurrence, RecSys'16.
TBPRWang et al. Social Recommendation with Strong and Weak Ties, CIKM'16'.
CDAE Wu et al., Collaborative Denoising Auto-Encoders for Top-N Recommender Systems, WSDM'16'.
DMF Xue et al., Deep Matrix Factorization Models for Recommender Systems, IJCAI'17'.
NeuMFHe et al. Neural Collaborative Filtering, WWW'17.
CUNE-BPRZhang et al., Collaborative User Network Embedding for Social Recommender Systems, SDM'17'.
IRGAN Wang et al., IRGAN: A Minimax Game for Unifying Generative and Discriminative Information Retrieval Models, SIGIR'17'.
SERec Wang et al., Collaborative Filtering with Social Exposure: A Modular Approach to Social Recommendation, AAAI'18'.
APR He et al., Adversarial Personalized Ranking for Recommendation, SIGIR'18'.
IF-BPRYu et al. Adaptive Implicit Friends Identification over Heterogeneous Network for Social Recommendation, CIKM'18'.
CFGANChae et al. CFGAN: A Generic Collaborative Filtering Framework based on Generative Adversarial Networks, CIKM'18.
NGCF Wang et al. Neural Graph Collaborative Filtering, SIGIR'19'.
DiffNet Wu et al. A Neural Influence Diffusion Model for Social Recommendation, SIGIR'19'.
RSGAN Yu et al. Generating Reliable Friends via Adversarial Learning to Improve Social Recommendation, ICDM'19'.
LightGCN He et al. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation, SIGIR'20.
DHCF Ji et al. Dual Channel Hypergraph Collaborative Filtering, KDD'20.
ESRF Yu et al. Enhancing Social Recommendation with Adversarial Graph Convlutional Networks, TKDE'20.
MHCN Yu et al. Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation, WWW'21.
SGL Wu et al. Self-supervised Graph Learning for Recommendation, SIGIR'21.
SEPT Yu et al. Socially-Aware Self-supervised Tri-Training for Recommendation, KDD'21.
BUIR Lee et al. Bootstrapping User and Item Representations for One-Class Collaborative Filtering, SIGIR'21.
SimGCL Yu et al. Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for Recommendation, SIGIR'22.

Related Datasets

   
Data Set Basic Meta User Context
Users ItemsRatings (Scale) Density Users Links (Type)
Ciao [1] 7,375 105,114 284,086 [1, 5] 0.0365% 7,375 111,781 Trust
Epinions [2] 40,163 139,738 664,824 [1, 5] 0.0118% 49,289 487,183 Trust
Douban [3] 2,848 39,586 894,887 [1, 5] 0.794% 2,848 35,770 Trust
LastFM [4] 1,892 17,632 92,834 implicit 0.27% 1,892 25,434 Trust
Yelp [5] 19,539 21,266 450,884 implicit 0.11% 19,539 864,157 Trust
Amazon-Book [6] 52,463 91,599 2,984,108 implicit 0.11% - - -

Reference

[1]. Tang, J., Gao, H., Liu, H.: mtrust:discerning multi-faceted trust in a connected world. In: International Conference on Web Search and Web Data Mining, WSDM 2012, Seattle, Wa, Usa, February. pp. 93–102 (2012)

[2]. Massa, P., Avesani, P.: Trust-aware recommender systems. In: Proceedings of the 2007 ACM conference on Recommender systems. pp. 17–24. ACM (2007)

[3]. G. Zhao, X. Qian, and X. Xie, “User-service rating prediction by exploring social users’ rating behaviors,” IEEE Transactions on Multimedia, vol. 18, no. 3, pp. 496–506, 2016.

[4]. Iván Cantador, Peter Brusilovsky, and Tsvi Kuflik. 2011. 2nd Workshop on Information Heterogeneity and Fusion in Recom- mender Systems (HetRec 2011). In Proceedings of the 5th ACM conference on Recommender systems (RecSys 2011). ACM, New York, NY, USA

[5]. Yu et al. Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation, WWW'21.

[6]. He et al. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation, SIGIR'20.

Acknowledgment

This project is supported by the Responsible Big Data Intelligence Lab (RBDI) at the school of ITEE, University of Queensland, and Chongqing University.

If our project is helpful to you, please cite one of these papers.

@inproceedings{yu2021socially,
title={Socially-aware self-supervised tri-training for recommendation},
author={Yu, Junliang and Yin, Hongzhi and Gao, Min and Xia, Xin and Zhang, Xiangliang and Viet Hung, Nguyen Quoc},
booktitle={Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining},
pages={2084--2092},
year={2021}
}

@inproceedings{yu2021self,
title={Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation},
author={Yu, Junliang and Yin, Hongzhi and Li, Jundong and Wang, Qinyong and Hung, Nguyen Quoc Viet and Zhang, Xiangliang},
booktitle={Proceedings of the Web Conference 2021},
pages={413--424},
year={2021}
}

qrec's People

Contributors

coder-yu avatar doutong avatar giginewstart avatar gorgeousdays avatar huxilifeng avatar lizzhang315 avatar niki666 avatar recq-cse avatar swjz avatar yuyu2223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qrec's Issues

您好,想请教下关于CFGAN的问题

您好,我看到您CFGAN实现中,在predictForRanking函数里对于测试集中那些没有出现在训练集的用户预测项目排名时,直接使用的是用户全局平均评分作为预测值,我想问一下这样做是不是不太合理啊,还是大部分的推荐算法都是这样做的呢?求指教。
我对测试集的使用有点不太懂,测试集里的用户应该大部分是没有出现在训练集中吧,如果直接使用用户的全局评分作为预测值,那算法不是相当于对大部分测试数据没有起到作用吗?

SocialMF update rule for P

I was looking at code for SocialMF and I saw that for updating self.P[u] the following rule is used: self.P[u] += self.lRate * (error * q - self.regU * p - self.regS * relationLoss), however I checked the paper and saw that another term is missing
capture

SocialMF

Hello,
I'm looking at the code of SocialMF.

I think that there is an error in this line:
relationLoss = p - fPred / denom
since p is the copy of the vector P[u] in the loop before.

Should it be corrected with
relationLoss = P[u] - fPred / denom
?

fold这个参数似乎没用过,一直都是默认的[1]

在所有的Recommender中的初始化函数中都有fold参数
def init(self,conf,trainingSet=None,testSet=None,relation=list(),fold='[1]'):

只有在RecQ中使用到了recommender = self.config['recommender']+'(self.config,self.trainingData,self.testData,self.relation)'

似乎没必要使用fold

When i use BasicMF,it has a bug,NameError: global name 'exit' is not defined

please enter the num of the algorithm to run it:3
loading training data...
preprocessing...
Algorithm: BasicMF
Ratings dataset: D:\Documents\GitHub\RecQ\dataset\FilmTrust\trainset.txt
Training set size: (user count: 1466, item count 1822, record count: 25437)
Test set size: (user count: 1228, item count 837, record count: 6414)

Reduced Dimension: 10
Maximum Iteration: 30
Regularization parameter: regU 0.050, regI 0.050, regB 0.100

Initializing model [1]...
Building Model [1]...
BasicMF [1] iteration 1: loss = 4504.4702, delta_loss = -4504.47023 learning_Rate = 0.10000 MAE:0.94468 RMSE:1.26997
BasicMF [1] iteration 2: loss = 3045.5222, delta_loss = 1458.94800 learning_Rate = 0.10000 MAE:0.82719 RMSE:1.10244
BasicMF [1] iteration 3: loss = 2488.2282, delta_loss = 557.29403 learning_Rate = 0.10500 MAE:0.79605 RMSE:1.05366
BasicMF [1] iteration 4: loss = 2083.2779, delta_loss = 404.95032 learning_Rate = 0.11025 MAE:0.76532 RMSE:1.01478
BasicMF [1] iteration 5: loss = 1695.7569, delta_loss = 387.52094 learning_Rate = 0.11576 MAE:0.74591 RMSE:0.99706
BasicMF [1] iteration 6: loss = 1451.4868, delta_loss = 244.27015 learning_Rate = 0.12155 MAE:0.75029 RMSE:1.00164
BasicMF [1] iteration 7: loss = 1379.8544, delta_loss = 71.63238 learning_Rate = 0.12763 MAE:0.77166 RMSE:1.02828
Loss = NaN or Infinity: current settings does not fit the recommender! Change the settings and try again!
D:\Documents\GitHub\RecQ\algorithm\rating\BasicMF.py:16: RuntimeWarning: overflow encountered in double_scalars
self.loss += error2
D:\Documents\GitHub\RecQ\algorithm\rating\BasicMF.py:21: RuntimeWarning: overflow encountered in multiply
self.P[u] += self.lRateerrorq
D:\Documents\GitHub\RecQ\algorithm\rating\BasicMF.py:16: RuntimeWarning: invalid value encountered in double_scalars
self.loss += error
2
Traceback (most recent call last):

File "", line 1, in
runfile('D:/Documents/GitHub/RecQ/main/main.py', wdir='D:/Documents/GitHub/RecQ/main')

File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 86, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "D:/Documents/GitHub/RecQ/main/main.py", line 117, in
recSys.execute()

File "RecQ.py", line 121, in execute
eval(recommender).execute()

File "D:\Documents\GitHub\RecQ\baseclass\Recommender.py", line 265, in execute
self.buildModel()

File "D:\Documents\GitHub\RecQ\algorithm\rating\BasicMF.py", line 26, in buildModel
if self.isConverged(iteration):

File "D:\Documents\GitHub\RecQ\baseclass\IterativeRecommender.py", line 80, in isConverged
exit(-1)

Typle Error

Hello professor!thanks for your code. when I run main.py and choose the algorithm . it always has the same question:
Traceback (most recent call last):
File "C:/Users/Administrator/Desktop/新建文件夹/RecQ/RecQ-master/main/main.py", line 67, in
recSys.execute()
File "C:\Users\Administrator\Desktop\新建文件夹\RecQ\RecQ-master\main\RecQ.py", line 100, in execute
self.measure = [dict.setdafault(m)[i] for i in range(1,k+1)]
File "C:\Users\Administrator\Desktop\新建文件夹\RecQ\RecQ-master\main\RecQ.py", line 100, in
self.measure = [dict.setdafault(m)[i] for i in range(1,k+1)]
AttributeError: type object 'dict' has no attribute 'setdafault'
How can I solve it?looking for your reply.

CFGAN结果复现

请问作者在做CFGAN试验时,有没有复现论文的结果?

问个问题 关于tensorflow的

看到有些代码支持tensorflow了 没咋接触过 请问tensorflow怎么debug呢?
意思就是说关于tensorflow的代码写错了 我怎么去发现啊

如何安装运行

您好,我想请教一下如何安装运行这个库,试过在anaconda上安装,但是失败了,希望能解答一下

On the implementation of CFGAN

Dear researchers:

Thank you so much for your interest in my paper, "CFGAN: A Generic Collaborative Filtering Framework based on Generative Adversarial Networks"
I just have found your implementation of my work, and it is really good.
However, I found several differences from my implementation of CFGAN.
I summarized it at CFGAN's project page: [http://www.agape.hanyang.ac.kr/cfgan]

Thank you again for your interest and very good implementation.
Have a good day!

Best,
Dong-Kyu

ImportError

你好~,我在anoconda2.7下进入main文件夹运行main.py,选择ItemKNN,发现没法import ItemKNN,
ImportError: No module named ItemKNN
大意是在main文件夹运行没法执行 from algorithm.rating.ItemKNN import ItemKNN
请问正确的运行姿势是什么...

Graph Neural Network for social recommendaiton

As you updated Deep Graph Collaborative Filtering recently, have you tried to implement another state-of-the-art algorithm GraphRec from the paper Graph Neural Network for Social Recommendation in RecQ?

I met some problems when implementing GraphRec as getting worse results than reported in the paper. I'm wondering if it's because my implementation is wrong or GraphRec doesn't work as reported.

数据

你好,数据集是不是要预先处理后才能使用你们的项目?还是项目有相关的代码划分数据集?

LOCABAL

Hello,
I can execute all the algorithms but not locabal. When I select locabal, it says to me "no module named LOCABAL".

Can you help me, please?

Question about IF-BPR: parameter batch_size is invalid!

I downloaded the ratings_data.txt and trust_data.txt from HERE, deleted the first line and placed it in dir dataset.

Run a4(IF-BPR) with this configuration file:

ratings=../dataset/epinions/ratings_data.txt
social=../dataset/epinions/trust_data.txt
ratings.setup=-columns 0 1 2
social.setup=-columns 0 1 2
recommender=IF_BPR
evaluation.setup=-cv 5 -b 1
item.ranking=on -topN 10
num.factors=20
num.max.iter=30
IF_BPR=-T 2 -L 20 -l 20 -w 5 -k 150 -a 0.2 -ep 5 -neg 5 -r 0.03
learnRate=-init 0.05 -max 1
reg.lambda=-u 0.01 -i 0.01 -b 0.01 -s 0.2
output.setup=on -dir ../results/

But I have encountered this problem:

please enter the num of the algorithm to run it:a4
loading training data...
loading social data...
preprocessing...
parameter batch_size is invalid!
parameter batch_size is invalid!
parameter batch_size is invalid!
parameter batch_size is invalid!
parameter batch_size is invalid!
Traceback (most recent call last):
  File "main.py", line 150, in <module>
    recSys.execute()
  File "/home/name/Desktop/RecQ/main/RecQ.py", line 100, in execute
    self.measure = [dict(m)[i] for i in range(1,k+1)]
KeyError: 1

Excuse me, may I ask which step did I not do well??

Computing precision and recall of LOCABAL

Hello,
I'm trying to test LOCABAL. If I compute MAE and RMSE I obtain reasonable results. But if I ask to the framework to compute precision@10, recall@10, etc. I obtain very low values like the following ones:

The result of LOCABAL [1]:
Top 10
Precision:2.36053190652e-05
Recall:4.52903641589e-05
F1:3.10351373706e-05
MAP:1.20828946366e-05
NDCG:3.38163865285e-05

The result of LOCABAL [1]:
MAE:0.843245316305
RMSE:1.07930190638

Can you help me, please?

有个小bug

config目录下的SoReg.conf第6行testSet.txt应该写成testset.txt。
另外,SoReg.py里的迭代公式只考虑了Followee� ,但没有考虑Followeer,是不是缺少一项,我看原论文中迭代公式考虑了两种情况。
还有由SoReg衍生的LOCABAL算法,看到你们有一个commit实现了,但后来又删除了,为什么不保留啊?

SoRec的TF版本

您好,我自己在尝试写SoRec的TF版本的遇到一个问题,因为损失函数涉及到评分矩阵和用户关系两个矩阵,不知道按批优化的时候能不能同时从这两个矩阵里抽取样本来进行优化

how to generate the data?

Hi,

Is there any tool to generate the data in the required format?
in particular, how to create the relationship between users?

Thanks,

LOCABAL梯度下降式子疑问

您好,我看到您写的LOCABAL算法了,我对您用的梯度下降公式有点疑问,您在哪儿找到的这个公式,我在原论文里没找到啊,然后我在其他论文里找到了部分,a synthetic approach for recommendation combining ratings social relations and reviews. 这个论文里使用了LOCABAL算法,他给出的迭代公式和您代码里写的还是有很大不同的。这里我还是有点疑惑的。

To apply ItemKNN to ranking problem.

Excuse me,
I run the main.py,and select the ItemKNN model.In my experiment,i want to apply itemKNN to ranking problem,but the output i see is a rating problem.what should i do ?

Temporal Factor in RS in general?

Was there any temporal dimension or consideration in your SVD model implementation?

Y. Koren, Collaborative Filtering with Temporal Dynamics, SIGKDD 2009.

Soreg 算法

您好!请问在实现Soreg 算法时,通过0.00001 0.00001 0.001 等改变社会正则化项的权重为什么得到RMSE的值变化不大,与论文里的不一样呢?

您好,想请教下关于CFGAN损失函数的问题

您好,我发现CFGAN的程序运行后G_loss的值为负值,然后我对比了下论文,您实现的是论文的CFGAN_ZP方法吧,发现您定义的损失函数也没什么问题,跟论文是一致的,所以很迷惑,想向您请教下是什么原因造成生成器的损失函数值为负?麻烦您了

ImportError: No module named mkl

你好,在Macbook上运行main.py出现了一个问题,下载了依赖mkl,还是出现这个:

/usr/local/bin/python2.7 /Users/feanlau/Desktop/RecQ/main/main.py
Traceback (most recent call last):
  File "/Users/feanlau/Desktop/RecQ/main/main.py", line 3, in <module>
    from RecQ import RecQ
  File "/Users/feanlau/Desktop/RecQ/main/RecQ.py", line 9, in <module>
    import mkl
ImportError: No module named mkl

Process finished with exit code 1

jietu20181010-145943

请问一下,这个问题如何解决

Question about Top N > 100

I got a new problem again.
I study about your code,and in baseclass/recommendation.py "evalRanking" function, I note that the TOP-N problem "N" must be less than 100 and greater than 0,and the indicators MAP,NDCG are computed as MAP@N,[email protected] i need to calculete them on all dataset with WRMF method, I modified your "evalRanking" function like this:

        if self.ranking.contains('-topN'):
            top = self.ranking['-topN'].split(',')
            top = [int(num) for num in top]
            N = len(self.data.item)

and i also modeified the RankMeasure function in measure.py.
But now I got the error:

  File "../baseclass/baseclass/Recommender.py", line 181, in evalRanking
    if recommendations[r] < itemSet[item]:
IndexError: list index out of range

So,How should i do?thanks.

请教

你好,请教个问题,元路径的设计有什么特别要求吗??怎样才是合理的??

Question about computing loss function

First of all thanks for this awesome library, I have one question about computing loss value of various algorithms, why you didn't use a separate function for computing loss?
For example in PMF for every training tuple we are adding self.regU * p.dot(p) + self.regI * q.dot(q) to loss value which is much more than what we have in proposed objective functions.

I was wondering using a function to calculate loss value effect algorithm final value?

implementation of RSTE

I have one question about implementation of RSTE algorithm, why there is no difference between update rule of this model and PMF? how we have exploited the social data in updating parameters?

EE模型

不好意思,又打扰您了,同样的参数设置.为什么EE模型得出来的结果和加入社交信息的模型没多大区别呢?难道又优化了吗?希望有空解答

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.