mquad / hgru4rec Goto Github PK
View Code? Open in Web Editor NEWCode for our ACM RecSys 2017 paper "Personalizing Session-based Recommendation with Hierarchical Recurrent Neural Networks"
License: MIT License
Code for our ACM RecSys 2017 paper "Personalizing Session-based Recommendation with Hierarchical Recurrent Neural Networks"
License: MIT License
Hi, is there any way where we can print the training accuracy percentage ?
hi, i have noticed that your work is very interesting. I want to reproduce the results. Since the recsys challenge has closed. I have no idea to download the dataset. I would appreciate a lot if you have any suggestions?
Hi,
Your paper is really interesting and thank you for providing your code.
I am currently trying to add additional features to the RNN input. I don't get any errors but the gpu utilisation drops massively and the computations get very slow. All I do is concatenating a batchsize x nr features tensor.matrix to embedding (SE_item) and provide the input respectively.
My questions are:
Have you tried something similar?
Am I missing something in the concatenation? do I need to adapt "Sin" aswell?
Code snippet of concatenation:
SE_item = self.E_item[X] # sampled item embedding
input_vec = T.concatenate([SE_item, X_additional], axis=1) # X_additonal -> tensor.matrix
vec = T.dot(input_vec, self.Ws_in[0]) + self.Bs_h[0]
Sin = SE_item
Thank you so much for your help
The Recsys Challenge 2016 data is no longer available. Is there any link that you can share the data? Thanks.
First, thank you for sharing a good paper and code.
We have inquiries about data and performance.
data statistics
When xing data was preprocessed based on your code, 58,035 items were derived.
The number of users and the number of events are the same as mentioned in your paper, but the number of items is different.
I wonder if you can recheck the number of items.
Performance
When I experiment through your scripts, I couldn't get as much performance as in your paper.
When I run the model with ten epochs, Recall@5 values of HRNN-All(#hidden=100) were 0.1280 and HRNN-All(#hidden=500) was 0.1355.
(the performance were 0.1334 and 0.1482 respectively in your paper)
Increasing the epoch did not change the outcome significantly.
Please check if the script you uploaded is correct for getting the best performance.
hi,
I'm not familiar with Theano, so I have some questions about the training process.
According to the code in line 919-936 in hgru4rec.py, it seems that the input length of data is set to 1 in each mini-batch, which means each mini-batch only consists of data from one time step. I am wondering, in this way, could the error back propagation through time?
Hi, your job is very amazing. I want to know if this method has been applied in the real recommendation scene? What is the effect?
Hi, I am trying to experience your work on my dataset, but I find that when I use evaluate_sessions() in evalutaion.py, something is wrong with "preds = pr.predict_next(sid, prev_iid, prev_uid, items_to_predict)", do you notice that?
I add logger.info(memmory_use)
in the iterate
function which is called in HGRU4REC.fit
and get the log below. Is this normal?
I run this code with CPU.
I run this code on my own dataset (about 28 million interaction)
I notice this because the process is out of memory.
2018-09-29 19:57:07,118: main: INFO: Training started
2018-09-29 19:57:38,527: hgru4rec: INFO: Epoch Begin!
2018-09-29 19:57:38,530: hgru4rec: INFO: 227.51(GB) memory left.
2018-09-29 19:57:38,600: hgru4rec: INFO: 227.51(GB) memory left.
..........
2018-09-29 20:01:47,200: hgru4rec: INFO: 209.16(GB) memory left.
..........
2018-09-29 20:05:31,439: hgru4rec: INFO: 191.81(GB) memory left.
..........
2018-09-29 20:08:45,621: hgru4rec: INFO: 177.09(GB) memory left.
..........
2018-09-29 20:11:37,108: hgru4rec: INFO: 164.1(GB) memory left.
..........
2018-09-29 20:14:05,733: hgru4rec: INFO: 152.86(GB) memory left.
..........
2018-09-29 20:16:07,679: hgru4rec: INFO: 143.68(GB) memory left.
..........
2018-09-29 20:17:50,016: hgru4rec: INFO: 136.02(GB) memory left.
..........
2018-09-29 20:19:15,243: hgru4rec: INFO: 129.7(GB) memory left.
..........
2018-09-29 20:20:31,730: hgru4rec: INFO: 124.03(GB) memory left.
..........
2018-09-29 20:22:54,691: hgru4rec: INFO: 114.76(GB) memory left.
..........
2018-09-29 20:26:05,653: hgru4rec: INFO: 106.84(GB) memory left.
..........
2018-09-29 20:28:25,798: hgru4rec: INFO: 96.48(GB) memory left.
..........
2018-09-29 20:31:37,315: hgru4rec: INFO: 82.28(GB) memory left.
....
2018-09-29 20:32:39,487: hgru4rec: INFO: Epoch 0 - train cost: 0.8193
hi , @mquad ,i can't get dataset from XING.com ,could you tell how to get the dataset?
thank you!
Hi,
I am not goot at Theano, so I cannot understand this clearly. Recently I am using Pytorch to reproduce this paper. About the loss function, I have some questions:
(1) Do you calculate the loss for each hidden state of GRU? Or only the last state?
(2) Do you regard this session-based recommendation as one multi-classification problem in which the class number is the number of items and BPR loss is applied here? If this, when the item number are too large, does this way still work?
Thank you very much.
In the initialization of session_level you use a mask for resetting the hidden state of the cell for some items of the batch and generate h_s = Hs[0] * (1 - Sstart[:, None]) + h_s_init * Sstart[:, None]
but then you use the same old state Hs[0]
to calculate the final output state of the current cell. Why is Hs[0]
used instead of h_s
in h_s = (1.0 - z) * Hs[0] + z * h_s_candidate.T
?. Thanks in advance.
I want to get the dataset and create a team as the instructions illustrated, but no one ever approved my team. Kindly provide me if you have it...
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.