Code Monkey home page Code Monkey logo

kerasgru4rec's Introduction

Hello ๐Ÿ‘‹

My name is Patricio, and I'm a Machine Learning Engineer from Chile.

Currently at MindsDB.

LinkedIn Twitter

Top Langs

kerasgru4rec's People

Contributors

dependabot[bot] avatar hidasib avatar paxcema avatar skyer9 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kerasgru4rec's Issues

License

Hey,
I saw that there is no license in the repo.
Can you please explain about using your code? What is permitted?
Thanks in advance

RECALL and MRR very low

I've tested the gru4rec implementation on 150K fashion clicks sequences.
I got very low MRR and Recall. (0.001698 RECALL and 0.000509 MRR )
batch size = 10 (because my seq length are small

any advice can help me.
Thanks
Screen Shot 2020-04-28 at 9 35 45

RNN cell reset done one step too late ...

Hi there,
As it seems your training generator basically generates the data so that for each batch you receive the reset mask at the beginning of the batch. To be more precise here are some examples:

Mask: []
Rest: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
Feat: [ 0  4  9 12 14 16 18 19 20 29]
Trgt: [ 1  4 10 13 15 17 18 19 20 29]

Mask: [3 4 5 6 9]
Rest: [0. 0. 0. 1. 1. 1. 1. 0. 0. 1.]
Feat: [ 1  4 10 30 32 36 34 19 20 32]
Trgt: [ 2  5 11 31 33 36 35 19 21 32]

As you can see from the generated data the model has to reset the RNN cells states prior to the fw/bp passes done in the train_on_batch, otherwise the reset will be done after the current session last step is "connected" to the next session first step. However in your code you are resetting the RNN cells after the train_on_batch.

gru4rec Real-Time prediction

Thanks for the gru4rec implementation with Keras.
What is the best approach to real-time prediction?

When the model is ready for real-time prediction and the sequence length are different. How can we set the whole sequence as one input compare to set one by one item?

Any answer will help
Thanks

Set different weights according to a sequence type

Thanks for implementing GRU4Rec in Keras.

I have a more theoretical question, like in the collaborative filtering approach, we can set the total rank to an item based on different interactions like view, add to cart, purchase.
It is possible to set different weights to different sequence types in this approach as well?

Thanks in advance

KerasGRU4Rec does not process on all possible events

Thanks for the implementation of Keras gru4rec.
I notify some issues in your code:

  1. The get_metric function does not take use of mask variable to reset the state after each session, thus the evaluation results may be wrong.
  2. Issue with SessionDataLoader. Since every session is varied in length, all the remaining events in the last batch_size sessions will not be processed as soon as one of this session finishes (while loop stops when maxiter >= len(click_offsets) - 1 but maxiter starts from max(batch_size), apparently we did not process all events). You can confirm it by comparing the total number of generated feat with (the total number of events - the total number of unique session).
    This can affect the evaluation result where number of batch_size is large and number of unique session is small. One potential fix is to use zero masking.

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.