tensorflow / tensorflow/recommenders
Question: How best to prepare a dataset for sequential recommendation.
@maciejkula is already working on this.
Since Aug 6, 2021.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
Me again :)
I would like to understand how best to prepare data for a sequential recommender similar to GRU4Rec.
Our data initially can be viewed as just a bunch of sequences of variable length, one sequence per user:
seqs = [
[a, b, a, c, d, e, d, g],
...
]
Now I assume we want to prepare a y or target, so the simplest approach (as I see it) is to:
- slice off the last element of each item in
seqsas they - pad the
seqsto a max length
But then there are many ways in which we could make different versions of this dataset, for example from seqs[0], we could actually make many rows by creating copies incrementally predicting the next item.
So my question is:
- is there any theoretical best practice on how to prep such a dataset?
- are there are helpers in terms of implementation to make this easier / cleaner within TFRS or a TF data pipeline?
- edit: is there also a specific way to prepare data and formulate the problem in order to predict not the next sequence value but further ahead?
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.