coder-yu / qrec Goto Github PK
View Code? Open in Web Editor NEWQRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)
QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)
I think in RecQ/algorithm/rating/ItemKNN.py 61rows about " if i1 <> i2" ? what does this means?
可以在py 3.6+跑吗?
不好意思,又打扰您了,同样的参数设置.为什么EE模型得出来的结果和加入社交信息的模型没多大区别呢?难道又优化了吗?希望有空解答
你好,请教个问题,元路径的设计有什么特别要求吗??怎样才是合理的??
训练过程中loss一直没有收敛,最后的rmse值到了3.多(但是使用相同的数据集,用Python版本训练时,rmse值只有一点多),请问是哪里的原因呢?
您好,我看到您CFGAN实现中,在predictForRanking函数里对于测试集中那些没有出现在训练集的用户预测项目排名时,直接使用的是用户全局平均评分作为预测值,我想问一下这样做是不是不太合理啊,还是大部分的推荐算法都是这样做的呢?求指教。
我对测试集的使用有点不太懂,测试集里的用户应该大部分是没有出现在训练集中吧,如果直接使用用户的全局评分作为预测值,那算法不是相当于对大部分测试数据没有起到作用吗?
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?
Hi,
Is there any tool to generate the data in the required format?
in particular, how to create the relationship between users?
Thanks,
Hi,
About the NDCG method in your code, the base of log is 'e'.
I have checked some papers, the base they used was ‘2’. Will this difference make any influence?
Thank you!
Reference: https://docs.python.org/2/library/math.html
感谢大佬们的工作,但是弱弱的问一句,你们可视化这个模块真的是测试过了吗,或在是修改之后忘了测试?display.py中self.dao = RatingDAO(conf, ratingData),而rating中的RatingDAO这个类需要config, trainingSet, testSet三个参数,谢谢
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
?
你好,在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
请问一下,这个问题如何解决
在所有的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
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 ?
你好,数据集是不是要预先处理后才能使用你们的项目?还是项目有相关的代码划分数据集?
您好,我发现CFGAN的程序运行后G_loss的值为负值,然后我对比了下论文,您实现的是论文的CFGAN_ZP方法吧,发现您定义的损失函数也没什么问题,跟论文是一致的,所以很迷惑,想向您请教下是什么原因造成生成器的损失函数值为负?麻烦您了
看到有些代码支持tensorflow了 没咋接触过 请问tensorflow怎么debug呢?
意思就是说关于tensorflow的代码写错了 我怎么去发现啊
Was there any temporal dimension or consideration in your SVD model implementation?
Y. Koren, Collaborative Filtering with Temporal Dynamics, SIGKDD 2009.
In similarity method and euclidean method, the parameters x1 and x2 are all dicts but not arrays, when they pass to common method, they will get wrong, I think it is a bug.
如题,我在论文里好像没有发现提供源码链接,所以是您自己复现的工作吗?
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??
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?
ModuleNotFoundError: No module named 'evaluation.dataSplit'; 'evaluation' is not a package
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.
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 += error2
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)
您好!请问在实现Soreg 算法时,通过0.00001 0.00001 0.001 等改变社会正则化项的权重为什么得到RMSE的值变化不大,与论文里的不一样呢?
您好,我自己在尝试写SoRec的TF版本的遇到一个问题,因为损失函数涉及到评分矩阵和用户关系两个矩阵,不知道按批优化的时候能不能同时从这两个矩阵里抽取样本来进行优化
请问作者在做CFGAN试验时,有没有复现论文的结果?
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?
config目录下的SoReg.conf第6行testSet.txt应该写成testset.txt。
另外,SoReg.py里的迭代公式只考虑了Followee� ,但没有考虑Followeer,是不是缺少一项,我看原论文中迭代公式考虑了两种情况。
还有由SoReg衍生的LOCABAL算法,看到你们有一个commit实现了,但后来又删除了,为什么不保留啊?
您好,我看到您写的LOCABAL算法了,我对您用的梯度下降公式有点疑问,您在哪儿找到的这个公式,我在原论文里没找到啊,然后我在其他论文里找到了部分,a synthetic approach for recommendation combining ratings social relations and reviews. 这个论文里使用了LOCABAL算法,他给出的迭代公式和您代码里写的还是有很大不同的。这里我还是有点疑惑的。
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.
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
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.
你好~,我在anoconda2.7下进入main文件夹运行main.py,选择ItemKNN,发现没法import ItemKNN,
ImportError: No module named ItemKNN
大意是在main文件夹运行没法执行 from algorithm.rating.ItemKNN import ItemKNN
请问正确的运行姿势是什么...
您好,我想请教一下如何安装运行这个库,试过在anaconda上安装,但是失败了,希望能解答一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.