Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recall指标对齐 #5

Open
zhujiem opened this issue Oct 16, 2020 · 2 comments
Open

Recall指标对齐 #5

zhujiem opened this issue Oct 16, 2020 · 2 comments

Comments

@zhujiem
Copy link

zhujiem commented Oct 16, 2020

您好,我看到ENMF与LightGCN 和NBPO等方法,但我发现ENMF代码中recall指标的计算与其他几种方法没有对齐。我想确定您给定的ENMF结果是使用下面第一种还是第二种的结果?

第一种:ENMF中使用的是len(hit_items) / min(topk, len(ground_truth))

第二种使用的是 len(hit_items) / len(ground_truth),如下
NBPO: https://github.com/Wenhui-Yu/NBPO/blob/master/Library.py#L14
LightGCN: https://github.com/kuandeng/LightGCN/blob/master/evaluator/python/evaluate_foldout.py#L20

@zhujiem
Copy link
Author

zhujiem commented Oct 16, 2020

另外,我想问下,您提到dropout是一个重要超参。但是我发现只有user_emb加了dropout,而item_emb没加,这种design是试出来的吗,还是有什么hints,谢谢!

@chenchongthu
Copy link
Owner

您好,感谢提问!第一个问题,我们在这些实验里用的是与LightGCN 和NBPO等相同的方法,即第二个版本len(hit_items) / len(ground_truth),服务器上的代码是调整过的,如下:
reca = tmp / true_bin.sum(axis=1)
prec = tmp / kj
F1 = 2.0 * prec * reca/ (prec + reca)
而github上的代码没有及时更新,现已更新。

第二个问题,关于dropout,user_emb加了dropout跟在item_emb加是一样的。
dropout的本质是将向量的部分置0来增加训练鲁棒性。如将向量[1,2,3]变为[1,0,3]。
假设用户向量为[1,2,3],商品向量为[4,5,6],ENMF预测时先对用户和商品向量做对应位点乘,预测向量即为[4,10,18]。
只在用户向量加dropout,用户[1,2,3]变为[1,0,3],商品向量不变,预测向量变为[4,0,18]和
只在商品向量加dropout,商品[4,5,6]变为[4,0,6],用户向量不变,预测向量变为[4,0,18]得到的结果是一样的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants