Add Dynamic Recurrent Basket Model (DREAM)#590
Add Dynamic Recurrent Basket Model (DREAM)#590lthoang wants to merge 1249 commits intoPreferredAI:masterfrom
Conversation
…AI#566) * Add Temporal-Item-Frequency-based User-KNN (TIFUKNN) model for next basket recommendation * replace KNN with KDTree * refactor code * Fix scoring function using the average neighbors vectors
* Added RecVAE * add recvae example * update readme * update README * fix conflict * remove local ndcg func * removed unnecessary things from the source code. * Add None Seed * Remove unsued code. Fix bottleneck * Added docstring for main class * sort the imports alphabetically * fix typo * reorder import s * CSR: Compressed Sparse Row, CSC: Compressed Sparse Colum * reorder imports * Update models.rst * Update README.md --------- Co-authored-by: SEUNGHEE.oh <seunghee.oh@hp.com> Co-authored-by: Quoc-Tuan Truong <tqtg@users.noreply.github.com>
* Add `data.dataset.SequentialDataset` to support new data formats: * "SIT": Session, Item, Timestamp * "SITJson": Session, Item, Timestamp, Json * "USIT": User, Session, Item, Timestamp * "USITJson": User, Session, Item, Timestamp, Json * Add `data.reader` parser for listed formats * Add `eval_method.NextItemEvaluation` for next-item evaluation * Add `models.SPop` baseline model: session-based popular * Add `gowalla` check-ins and `yoochoose` datasets * Add unit tests --------- Co-authored-by: lthoang <trhoanglee@gmail.com> Co-authored-by: tqtg <tuantq.vnu@gmail.com>
* add config.yml * Bump circleci python orb version
…ion (UPCF) Model (PreferredAI#587) * Add Recency Aware Collaborative Filtering for Next Basket Recommendation (UPCF) Model * Remove unused seed variable * Fixed similaripy version
…referredAI#584) * Add beacon model * Add example * Update docs * Fixed data_iter * refactor code
…referredAI#586) * Add DNNTSP Model * refactor code * refactor code * Fix scoring function * refactor code * Add random seed * refactor code * refactor code * Fix weight_mse and multi_label loss * Update multi_label loss using sum reduction --------- Co-authored-by: Quoc-Tuan Truong <tqtg@users.noreply.github.com>
| from tqdm.auto import trange | ||
|
|
||
|
|
||
| class Wloss(nn.modules.loss._Loss): |
There was a problem hiding this comment.
What is W loss? Can it be more informative or is it an acronym by the authors?
There was a problem hiding this comment.
@tqtg I am not quite sure about the acronym for Wloss. The current implementation is based on this implemenation https://github.com/liming-7/A-Next-Basket-Recommendation-Reality-Check/tree/main/methods/dream
The authors of the above implementation also refer the running source code to this repo https://github.com/yihong-chen/DREAM
However, these two implementations are quite different in their naming convention. I haven't read through them thoroughly. Let's take some time to check the validity of both implementations, whether they reflect the paper idea.
There was a problem hiding this comment.
Glancing at the paper, I only see BPR loss is used without additional information. I think it's better to rely on the original implementation which contains 2 variants (BPR and reordered BPR).
| self.loss_fct = nn.BCELoss() | ||
| self.p_loss_fct = Wloss(self.loss_uplift, 1) | ||
| self.n_loss_fct = Wloss(1, self.loss_uplift) | ||
| self.meta_loss_fct = nn.MSELoss() |
There was a problem hiding this comment.
I think meta_loss_fct is not used anywhere during training.
…aining sequences as default (PreferredAI#591)
|
@lthoang are we actively working on this? |
Yes. I will be back to this model next week. |
Description
Related Issues
#579
Checklist:
README.md(if you are adding a new model).examples/README.md(if you are adding a new example).datasets/README.md(if you are adding a new dataset).