Coder Social home page Coder Social logo

recbole-da's Introduction

RecBole-DA

RecBole-DA is a library built upon PyTorch and RecBole for reproducing and developing data augmentation for sequential recommendation.

1)Highlights

  • Easy-to-use API: Our library provides extensive API based on common data augmentation strategies, users can further develop own new models based on our library.
  • Full Coverage of Classic Methods: We provide seven data augmentation methods based on recommender systems in three major categories.

2)Implemented Models

Our library includes algorithms covering three major categories:

  • Heuristic-based Methods: CL4SRec, DuoRec
  • Model-based Methods: MMInfoRec, CauseRec
  • Hybird Methods: CASR, CCL, CoSeRec

3)Requirements

recbole>=1.0.0
pytorch>=1.7.0
python>=3.7.0

4)Quick-Start

With the source code, you can use the provided script for initial usage of our library:

python run_seq.py --dataset='ml-1m' --train_batch_size=256 lmd=0.1 --lmd_sem=0.1 --model='CL4SRec' --contrast='us_x' --sim='dot' --tau=1

If you want to change the models or datasets, just run the script by setting additional command parameters:

python run_seq.py -m [model] -d [dataset]

5)The Team

RecBole-DA is developed and maintained by members from RUCAIBox, the developer is Shuqing Bian (@fancybian).

6) Acknowledgement

CoSeRec and CauseRec are implemented based on CoSeRec and CauseRec. Thanks them for providing efficient implementation.

recbole-da's People

Contributors

fancybian avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

recbole-da's Issues

找不到CoSeRec的实现

Hi,感谢贵团队的辛苦付出!文档中有说明已实现CoSeRec,但是我并未在代码中找到,请问大概什么时候可以release呢?

Questions for RecBole Installation & Error Reports

Hi, I'm watching your helpful work!

But I'm encountering some issues as below:

I saw in readme: requirements: recbole >= 1.0.1

but, there is a local folder that indicates recbole inside this repo.

  • Which one should be used?

And I refer to your quickstart note for CL4SRec for the AWS Beauty (Auto-download also is not working) for the best performance preset and I try this setting but I encounter the error:

Traceback (most recent call last):
  File "run_seq.py", line 15, in <module>
    run_recbole(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
  File "/root/exp/RecBole-DA/recbole/quick_start/quick_start.py", line 48, in run_recbole
    train_data, valid_data, test_data = data_preparation(config, dataset)
  File "/root/exp/RecBole-DA/recbole/data/utils.py", line 127, in data_preparation
    train_data = dataloader(**train_kwargs)
TypeError: __init__() got an unexpected keyword argument 'phase'

Lastly, as I know original CL4SRec used BPR loss but the best setting was seem to be on cross-entropy.
So I wonder which one can be trusted.

I'll wait for your response :)
Thanks!

您好,请问我们的对比学习算法,是不是存在一些问题呀~还是说是对比学习的问题

您好,作者。我很感谢您的框架为我的科研工作带来的方便。我今天测试CL4Rec模型进行对比学习时,数据选的是ml-100K,我的结果如下:其他参数均为默认参数,没有对比学习是指计算loss时
把原本的“return loss + self.lmd * nce_loss, alignment, uniformity”改为 “return loss, alignment, uniformity”,删除了对比学习的nceloss.

#todo 加了对比学习:
#best valid : {'recall@5': 0.0435, 'recall@10': 0.0827, 'recall@20': 0.1463, 'recall@50': 0.2948, 'mrr@5': 0.0212, 'mrr@10': 0.0264, 'mrr@20': 0.0309, 'mrr@50': 0.0356, 'ndcg@5': 0.0266, 'ndcg@10': 0.0393, 'ndcg@20': 0.0555, 'ndcg@50': 0.0849, 'precision@5': 0.0087, 'precision@10': 0.0083, 'precision@20': 0.0073, 'precision@50': 0.0059}
#test result: {'recall@5': 0.0318, 'recall@10': 0.0636, 'recall@20': 0.1166, 'recall@50': 0.2534, 'mrr@5': 0.0149, 'mrr@10': 0.0188, 'mrr@20': 0.0224, 'mrr@50': 0.0266, 'ndcg@5': 0.019, 'ndcg@10': 0.0289, 'ndcg@20': 0.0422, 'ndcg@50': 0.0692, 'precision@5': 0.0064, 'precision@10': 0.0064, 'precision@20': 0.0058, 'precision@50': 0.0051}

#!没有加对比学习:
#best valid : {'recall@5': 0.0626, 'recall@10': 0.1007, 'recall@20': 0.1782, 'recall@50': 0.3309, 'mrr@5': 0.0336, 'mrr@10': 0.0386, 'mrr@20': 0.0436, 'mrr@50': 0.0484, 'ndcg@5': 0.0408, 'ndcg@10': 0.0531, 'ndcg@20': 0.0722, 'ndcg@50': 0.1023, 'precision@5': 0.0125, 'precision@10': 0.0101, 'precision@20': 0.0089, 'precision@50': 0.0066}
#test result: {'recall@5': 0.0477, 'recall@10': 0.0965, 'recall@20': 0.158, 'recall@50': 0.298, 'mrr@5': 0.0187, 'mrr@10': 0.0249, 'mrr@20': 0.0291, 'mrr@50': 0.0335, 'ndcg@5': 0.0258, 'ndcg@10': 0.0413, 'ndcg@20': 0.0568, 'ndcg@50': 0.0844, 'precision@5': 0.0095, 'precision@10': 0.0097, 'precision@20': 0.0079, 'precision@50': 0.006}
很明显,加了对比学习的效果比没有加的好……

关于模型的问题

你好,感谢RecBole团队的付出,我在使用时没找到有关模型的定义,请问在哪?

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.