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

尝试用General recommendation models进行个性化试题推荐发现效果不太好,求助 #2040

Open
yzy945 opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@yzy945
Copy link

yzy945 commented Apr 26, 2024

使用model=NCEPLRec,自己的数据集进行试题个性化推荐
数据集如下:
user_id:token item_id:token rating:float
300872 200130 2
300872 200139 2
300872 200234 0
……
1、rating列是用户所做过试题的一个评分,例如做对得0(难度最低所以得分最低);做错且耗时很久为5分(対用户来说题目很难);1-4分根据用户答题错误和时长的多少等特征进行赋分
2、数据集中会有很多具有相同user_id、item_id的行,rating值可能不一样。(用户把同一套题做了几遍,有时答对、有时答错)
3、item_id值的分布很不均匀,原因是有些试卷做得比较多因此item_id的数据比较多,有些试卷做得很少,因此值分布少

参数配置基本上为默认,训练结果如下:
26 Apr 11:01 INFO best valid : OrderedDict([('recall@50', 0.6374), ('mrr@50', 0.5729), ('ndcg@50', 0.5118), ('hit@50', 0.9464), ('precision@50', 0.1768)])
26 Apr 11:01 INFO test result: OrderedDict([('recall@50', 0.665), ('mrr@50', 0.7782), ('ndcg@50', 0.6534), ('hit@50', 0.9383), ('precision@50', 0.1966)])

上述训练结果看起来不错,但使用 full_sort_topk(uid_series, model, test_data, k=topK, device=config['device'])得到top50的数据,然后去数据集中根据user_id、top50的item_id找到真实rating,发现预测值与真实值差距很大,几乎没有命中。top50的预测itemid基本上都是数据集中出现频繁较多的itemid

请问是不是:
1、模型通过简单地依据item流行度(数据集中频繁出现的itemid)进行了推荐,这是导致训练模型时评估结果有('hit@50', 0.9383)的原因吗?
但为什么我手动验证完全不能命中测试集中按真实值排序的top50项?有尝试看了下hit具体计算的类,没找出原因所在。
2、试题个性化推荐的需求是否适合使用这类General Recommendation模型,下一步考虑测试下Context-aware Recommendation相关模型
3、对于数据集的处理:目前是通过制定规则计算出rating评分,貌似不是最佳方案,且同一用户做同一套试卷几次后,有很多具有相同user_id、item_id的行(rating值不同),有尝试过只取最新那一条,效果也不好

@yzy945 yzy945 added the enhancement New feature or request label Apr 26, 2024
@zhengbw0324 zhengbw0324 self-assigned this May 6, 2024
@zhengbw0324
Copy link
Collaborator

@yzy945
您好!我觉得您的情况应该是受到严重的流行度偏差影响,需要使用特定的去偏手段,如 IPS(Inverse Propensity Scoring)。您可以参考我们RecBole2.0中的RecBole-Debias库。

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

No branches or pull requests

2 participants