PreferredAI / cornac

A Comparative Framework for Multimodal Recommender Systems
https://cornac.preferred.ai
Apache License 2.0
845 stars 138 forks source link

[FEATURE] Support chronological split for next-basket recommendation #604

Open lthoang opened 3 months ago

lthoang commented 3 months ago

Description

Dataset can be split by the order of basket in user sequence. NextBasketEvaluation now supports splitting data by user sequence. The data will be split based on user_id, meaning users in training, validation, and testing do not overlap.

In this requested feature, users in validation and test should be available in training data.

Expected behavior with the suggested feature

We can keep the last basket in sequence as testing, second last basket as validation, and the rest as training. For example, a sequence b1 b2 b3 b4 can be split into train b1 b2, validation b3, and test b4 while the history baskets for validation is b1 b2 and the history baskets for test is b1 b2 b3.

tqtg commented 3 months ago

Do we need it to preserve the order of b3 for validation and b4 for testing, or it can be arbitrary?

lthoang commented 3 months ago

Do we need it to preserve the order of b3 for validation and b4 for testing, or it can be arbitrary?

@tqtg I think we should preserve the order of b3 and b4 for validation and testing as validation data can be included in the historical baskets for test.

We can also add another option to specify whether we should keep the order or not. However, we need a motivating example for the arbitrary case.

tqtg commented 3 months ago

Using validation data for testing is also a debatable topic. I think it's good to include a couple of paper references as motivation for this feature.

lthoang commented 3 months ago

Using validation data for testing is also a debatable topic. I think it's good to include a couple of paper references as motivation for this feature.

MMNR: Multi-view Multi-aspect Neural Networks for Next-basket Recommendation, code https://github.com/Hiiizhy/MMNR