ahuiwang / cikm2020-s3rec Goto Github PK
View Code? Open in Web Editor NEWCode for CIKM2020 "S3-Rec: Self-Supervised Learning for Sequential Recommendation with Mutual Information Maximization"
Code for CIKM2020 "S3-Rec: Self-Supervised Learning for Sequential Recommendation with Mutual Information Maximization"
Hi,
I am a beginner in recommendation system and have recently been working on sequence recommendations. Thank you very much for providing the code for the s3rec model, I have reproduced the results, which I learned a lot from.
But I encountered a problem. I noticed that the gru4rec, SASrec, bert4rec, and caser models have very different values in different paper, but I have insufficient code ability to find difficulties in reproducing these models. I was so frustrated๐ญ. Could you provide the code of these models you reproduced? Thanks! ๐ญ
Yelp Raw data has been processed! Lower than 0.0 are deleted! User 5-core complete! Item 5-core complete! Total User: 19855, Avg User: 10.4279, Min Len: 5, Max Len: 235 Total Item: 14541, Avg Item: 14.2387, Min Inter: 5, Max Inter: 317 Iteraction Num: 207045, Sparsity: 99.93% Begin extracting meta infos... 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 150346/150346 [00:49<00:00, 3008.29it/s] 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 14541/14541 [00:00<00:00, 491683.26it/s] before delete, attribute num:809 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 14541/14541 [00:00<00:00, 136748.70it/s] after delete, attribute num:809 attributes len, Min:1, Max:36, Avg.:5.2599 Yelp & 19,855& 14,541 & 10.4& 14.2& 207,045& 99.93\%&809&5.3 \
ๆ็จไบ/data/data_process.py ็จๅบๅค็ๅฎ็ฝไธ่ฝฝ็ๆฐๆฎ้ใhttps://www.yelp.com/datasetใ็ถๅไฝฟ็จ้้ข็yelp_academic_dataset_review.json๏ผ yelp_academic_dataset_business.json ๆไปถ๏ผ ไฝๆฏ็ปๆๅฆไธๅพๆ็คบใ
่ฎบๆ็Yelpๆฐๆฎๆฏ
Yelp
users: 30,431
items: 20,033
avg.: 10.4
actions: 316,354
่ฏท้ฎๆฏๆฐๆฎ้็้ฎ้ขๅ๏ผ่ฟๆฏๆถ้ด้่ฆ่ฐๆด๏ผ
`def main(data_name, data_type='Amazon'):
assert data_type in {'Amazon', 'Yelp'}
np.random.seed(12345)
rating_score = 0.0 # rating score smaller than this score would be deleted
# user 5-core item 5-core
user_core = 5
item_core = 5
attribute_core = 0
if data_type == 'Yelp':
date_max = '2019-12-31 00:00:00'
date_min = '2019-01-01 00:00:00'
datas = Yelp(date_min, date_max, rating_score)
else:
datas = Amazon(data_name+'_5', rating_score=rating_score)`
Hi, may I ask in line 267 of the trainer.py , why do we need to change the prediction result of the input items to 0?
Hi,
Can please provide baseline implementation code?
thank you.
thanks for your work! I have reproduced your work recently. But it is suppppper time-consuming. What kind of GPU did you use at the time, how many GPUs did you use and how long did it take for the pre-training phase and the fine-tuning phase? ๐ญ
Hi, thank you very much for sharing the code. May I ask where to find "artist2attributes.json" file in the "data_preprocess.py"?
Hi,
Thank you for your great work!
I tested run_funetune_full with default settings on the Beauty dataset with pre_train ckp 150 and got the following result:
Finetune_full-Beauty-150 {'Epoch': 0, 'HIT@5': '0.0381', 'NDCG@5': '0.0239', 'HIT@10': '0.0617', 'NDCG@10': '0.0316', 'HIT@20': '0.0982', 'NDCG@20': '0.0407'}
I found that everything is ok, but the 'HIT@10' and 'NDCG@10' is different from the result reported in the ReadMe.
Are there any different hyperparameter settings with run_finetune_full?
Hello author, I want to learn your code, but the data set I downloaded from the Internet seems to be missing some files. Can you share the download link of the data set?
For example, I can't find the file named "artist2attributes.json" or "artist2tags.json" in the LastFM data set, since I downloaded it from the Internet only have these files below :
Looking for your reply, thanks a million!
Thanks for your great work! But i encounted two questions.
many thanks.
Hi, thanks for your great work!
But I have a question. I reran the source code of the SASRec model, using multiple 5-core datasets you provided. But I found that their results are different from the results you reported. For example๏ผi use the code of https://github.com/pmixer/SASRec.pytorch, and the Beauty.txt file you provided in the data folder, we will get the result NDCG@10: 0.3384 and HR@10: 0.5059. Besides, on the sports dataset, we can also get the results NDCG@10: 0.3139 and HR@10: 0.5058. At the same time, we modified the code ourselves so that SASRec does not negatively sample and sorts on all items, and the results are far from the data you provided. Can you provide some instructions on how to get the performance results of the SASRec model on the 5-core dataset?
Thanks
Hi, thanks for your great work!
But I have a question. Did you use the smaller dataset mentioned in http://jmcauley.ucsd.edu/data/amazon/links.html, or did you contact the author to obtain a larger one? In other word, if i run your code for reproduction, do I need to download datasets from other website? Or are all datasets in your repo?
Thanks
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.