cornac icon indicating copy to clipboard operation
cornac copied to clipboard

Rearrange examples and models

Open tqtg opened this issue 1 year ago • 6 comments

Description

I was thinking to rearrange some files in examples folder into model-specific folders. We only retain the ones for basic usage. It will help tidy up examples folder a bit. At the same time, we can have a README file in each of the model folders for any relevant information (i.e., paper, authors, requirements, how-to-run example, any results/reproducibility/notes about the model, etc). Currently, when we click on a model from the main README, it opens the model folder without any useful information inside.

Expected behavior with the suggested feature

Other Comments

tqtg avatar Nov 01 '23 17:11 tqtg

Agreed with this. Could I suggest that we do something like this:

cornac
  |--- examples
          |--- <more task specific examples. e.g. first new model>
                   |-- Readme.md
                   |-- first-model.py

That way, we can group different models together (e.g. graph models, ranking models). Will it be a good idea, or do we prefer a model by model approach.

darrylong avatar Nov 03 '23 04:11 darrylong

Shall we have multiple hierarchies for grouping models into tasks (general recommendation, next-item recommendation, next-basket recommendation) or modalities (text or review, graph, image, sentiment), etc?

lthoang avatar Jan 07 '24 15:01 lthoang

Taking into consideration the increase in methods and number of models, could I suggest something like the following:

cornac
  |--- examples
  |       |--- README.md  // we add task specific examples in this folder
  |       |--- first_example.py
  |       |--- param_search.py
  |       |--- next_item_example.py
  |       |--- ...
  |--- cornac
          |--- models
                 |--- <model_A>
                        |--- README.md  // we add model specific examples to this folder
                 |--- <model_B>
                        |--- README.md
                 |--- ...

Feel free to suggest a better structure too. Thanks!

darrylong avatar Jan 08 '24 02:01 darrylong

@lthoang what do think about the suggestion by @darrylong? Do you think it’s a good idea to only keep generic examples here and move most of the examples into their corresponding model folders?

tqtg avatar Jan 08 '24 03:01 tqtg

Does it make sense to move all NEW models into their categorization folder?

cornac
  |--- cornac
          |--- models
                 |--- BPR
                 |--- NCF
                 |--- NextItem
                        |--- GRU4Rec
                 |--- NextBastket
                        |--- Pop

I feel it's easier to navigate through the models when I approach a new recommender problem.

hieuddo avatar Jan 08 '24 04:01 hieuddo

@hieuddo I think it’s also a good idea to restructure the models folder. However, it’s a bit more complicated and involved than this one. How about we focus on the examples folder first? This exercise will also give us better idea on how we want to categorize models. Would you mind creating another issue for your suggestion above?

tqtg avatar Jan 08 '24 07:01 tqtg