recommenders icon indicating copy to clipboard operation
recommenders copied to clipboard

Any example for sequential recommendations?

Open jiwidi opened this issue 3 years ago • 10 comments

Hi! Ive been reading the docs and I couldnt find any example for sequential recommendations, commonly used for session based recommenders.

Is that use case covered by the functionalities in this repo? Any example about it?

Thanks!

jiwidi avatar Oct 16 '21 22:10 jiwidi

Hi @jiwidi I am looking for the same - best I found was this issue: https://github.com/tensorflow/recommenders/issues/119

ydennisy avatar Oct 30 '21 18:10 ydennisy

@ydennisy Ill check it out thanks!

jiwidi avatar Oct 30 '21 18:10 jiwidi

@maciejkula I would also like to suggest that I feel this could be quite a good tutorial to add if possible :)

ydennisy avatar Nov 04 '21 14:11 ydennisy

Published 21 hours ago: https://github.com/tensorflow/recommenders/blob/main/docs/examples/sequential_retrieval.ipynb

Pretty version: https://www.tensorflow.org/recommenders/examples/sequential_retrieval

kylemcmearty avatar Dec 02 '21 21:12 kylemcmearty

Yep, we created that tutorial after seeing your feature request here

windmaple avatar Dec 03 '21 07:12 windmaple

I read the TFRS paper.

How can we share the same movie embeddings for movie past watches and movie label? This approach is mentioned on a paper image: https://i.imgur.com/LABo21v.png

Using the same vocab for building the embeddings is enough? Thanks!

almirb avatar Dec 03 '21 14:12 almirb

I read the TFRS paper.

How can we share the same movie embeddings for movie past watches and movie label? This approach is mentioned on a paper image: https://i.imgur.com/LABo21v.png

Using the same vocab for building the embeddings is enough? Thanks!

Maybe @maciejkula or @windmaple could shed some light on this.. :)

almirb avatar Dec 06 '21 11:12 almirb

You will need to share the embedding table you use for past movie watches and movie labels in order to share the embeddings.

maciejkula avatar Dec 20 '21 18:12 maciejkula

You will need to share the embedding table you use for past movie watches and movie labels in order to share the embeddings.

Can I share the same embedding table even if I need to use a "string splitter" as the first layer, and adding a GlobalAveragePooling1D as the last one?

Past watches needs a splitter... movie labels don't...

almirb avatar Dec 20 '21 18:12 almirb

As long as you pass the ids into the same Python embedding layer object, you will be sharing embeddings, regardless of the processing.

maciejkula avatar Dec 20 '21 19:12 maciejkula