Comments (3)
I just have the code for this part in another paper of mine https://arxiv.org/abs/2209.02544
For your reference
def group_evaluation(self,recList,top):
popularity = {}
for item in self.data.training_set_i:
popularity[item] = len(self.data.training_set_i[item])
testset = []
for user in self.data.test_set:
for item in self.data.test_set[user]:
if item in popularity:
testset.append((user,item,popularity[item]))
testset = sorted(testset,key=lambda d:d[2])
p_idx = np.linspace(0,len(testset),11)
p_idx = [round(n) for n in p_idx]
groups = []
for i in range(10):
group = {}
for user in recList:
group[user]={}
for k in testset[p_idx[i]:p_idx[i + 1]]:
group[k[0]][k[1]] = 1
groups.append(group)
measures=[]
for group in groups:
ms = ranking_evaluation_group(group, recList, self.data.test_set,top)
measures.append(ms)
from qrec.
Thanks for the reference, however can I also get the code for 'ranking_evaluation_group' function?
I'm also having trouble getting recall scores from each groups.
I would really appreciate it. Thanks
Best,
Joe
from qrec.
The core code has been provided. Do it yourself
from qrec.
Related Issues (20)
- 数据集问题 HOT 1
- 关于MHCN的性能问题 HOT 1
- 关于ESRF的问题请教 HOT 6
- Visual image rendering HOT 2
- yelp数据集的疑问 HOT 1
- 用相同的数据集训练,设置相同的种子,相同的参数。MHCN在QRec上的表现明显优于SELFRec是什么原因啊 HOT 5
- 关于ESRF代码如何提取出 alternative neighborhood HOT 3
- KeyError: 1 HOT 8
- 更改训练集和测试集 HOT 4
- 有关新模型训练 HOT 1
- 如何配置evaluation.setup下的-predict参数 HOT 2
- 可视化结果 HOT 2
- LightGCN復現性能問題 HOT 3
- 模型CUNE_BPR运行报错 HOT 1
- Yelp数据集获取 HOT 1
- SimGCL的实现中,为什么要对扰动噪声加l2归一化呢?而且现有扰动的噪声是否太大了? HOT 1
- 关于xsimgcl噪声的一些问题,想请教大佬 HOT 2
- 许多模型在配置好参数后,运行main.py,发现会直接进入evaluate,而没有train HOT 4
- Epinions Download HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrec.