[QST] Recommend items for a user based on the sequence of her prior baskets
❓ Questions & Help
Details
In the current examples, Transformers4Rec takes the sequential interactions in a session to predict the next item. Can we use this framework for the task of predicting the next items to buy based on a user's prior baskets? Note that in this case, since the sales were made offline, the sequential information of items within a basket is unknown while the sequential information of baskets is given,
e.g. user_A purchased basket_1, basket_2, ..., basket_n where basket_i includes item_1, ..., item_k_i and the purchase order of these items are unknown.
I could just concatenate all the baskets to generate a sequence of items where the items in the same basket having the same timestamp. But the problem is when using the causal language model, we use the information of previous items to predict the next purchase, in other words the only option under the current framework is to mask at the item level while what we need for this problem is to be able to mask at the basket level.
Is there any plan to implement this masking mechanism so that we could mask at the basket level? It could be a low-effort implementation that will enable the framework to handle a popular type of questions (next-basket recommendation).
Similar concerns, Can we try to train the model as array of arrays and define a loss function based on the last array.