Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basket models #216

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
311a423
ADD: Trip, TripDataset and Shopper
julesdesir Jan 15, 2025
7b6fc4b
MAINT: fix typos in docstrings
julesdesir Jan 15, 2025
834757b
ADD: data preprocessing for basket models
julesdesir Jan 15, 2025
1560348
MAINT: fix typos in docstrings
julesdesir Jan 15, 2025
bf71ef5
ENH: remove unnecessary enumerate() in for loop
julesdesir Jan 15, 2025
1909362
MAINT: fix typos in docstrings and variable names
julesdesir Jan 15, 2025
2ca140c
FIX: weight of the loss of the last batch in the loss of the whole epoch
julesdesir Jan 15, 2025
235f7d7
TST: tests for basket models
julesdesir Jan 15, 2025
f7e06de
DOC: add SHOPPER in readme and in docs
julesdesir Jan 15, 2025
aa000ab
DOC: fix typos in readme
julesdesir Jan 15, 2025
23c426a
DOC: add SHOPPER references in documentation index
julesdesir Jan 16, 2025
dc6347b
FIX: path to data for basket models
julesdesir Jan 17, 2025
0581efe
ENH: first part of changes following review
julesdesir Jan 17, 2025
7d75651
ENH: use 5 variables for batch instead of only 1
julesdesir Jan 17, 2025
1613925
ENH: second part of changes following review
julesdesir Jan 17, 2025
7171cbe
ENH: lazy instantiation in .fit + some attributes moved to __init__
julesdesir Jan 20, 2025
380333b
TST: update Shopper tests with the new attributes in __init__
julesdesir Jan 20, 2025
e0b266a
ENH: add assortment attribute to Trip and take into account assortmen…
julesdesir Jan 21, 2025
92a07e4
TST: update Shopper tests with assortment handling
julesdesir Jan 21, 2025
0dd49dc
FIX: handling assortments when stage=3
julesdesir Jan 21, 2025
76281d9
MAINT: rename base_basket.py
julesdesir Jan 21, 2025
bd41337
MAINT: clean useless comment lines
julesdesir Jan 21, 2025
354e925
ENH: first part of changes following 2nd review round
julesdesir Jan 22, 2025
9fc78f0
ENH: second part of changes following 2nd review round
julesdesir Jan 22, 2025
094c133
ADD: __getitem__ method for the TripDataset class
julesdesir Jan 22, 2025
8743f65
DEP: np.in1d deprecated since NumPy 2.0, use np.isin instead
julesdesir Jan 22, 2025
25aee29
MAINT: fix typos
julesdesir Jan 22, 2025
1dd39b1
ENH: move thinking ahead to a dedicated function
julesdesir Jan 23, 2025
22aa356
ENH: remove unnecessary case distinction when computing item_utilities
julesdesir Jan 23, 2025
45982a2
FIX: load_model without losing hyperparameter values
julesdesir Jan 23, 2025
7a5b4fb
ENH: a call to from_csv builds only one TripDataset and not train/val…
julesdesir Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ If you are new to choice modeling, you can check this [resource](https://www.pub
| RUMnet| [notebook](notebooks/models/rumnet.ipynb) | [![Open In Colab](https://img.shields.io/badge/-grey?logo=googlecolab)](https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/rumnet.ipynb) |Aouad and Désir [[1]](#trident-references) | *RUMnet* | [#](https://artefactory.github.io/choice-learn/references/models/references_rumnet/#choice_learn.models.rumnet.PaperRUMnet) |
| TasteNet | [notebook](notebooks/models/tastenet.ipynb) | [![Open In Colab](https://img.shields.io/badge/-grey?logo=googlecolab)](https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/tastenet.ipynb) |Han et al. [[7]](#trident-references) | *TasteNet* | [#](https://artefactory.github.io/choice-learn/references/models/references_tastenet/) |
| Learning-MNL | [notebook](notebooks/models/learning_mnl.ipynb) | [![Open In Colab](https://img.shields.io/badge/-grey?logo=googlecolab)](https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/learning_mnl.ipynb) |Sifringer et al. [[13]](#trident-references) | *LearningMNL* | [#](https://artefactory.github.io/choice-learn/references/models/references_learning_mnl/) |
| ResLogit | [notebook](notebooks/models/reslogit.ipynb) | [![Open In Colab](https://img.shields.io/badge/-grey?logo=googlecolab)](https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/reslogit.ipynb) |Wong and Farooq [[12]](#trident-references) | *ResLogit* | [#](https://artefactory.github.io/choice-learn/references/models/references_reslogit/) |
| ResLogit | [notebook](notebooks/models/reslogit.ipynb) | [![Open In Colab](https://img.shields.io/badge/-grey?logo=googlecolab)](https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/reslogit.ipynb) |Wong and Farooq [[12]](#trident-references) | *ResLogit* | [#](https://artefactory.github.io/choice-learn/references/models/references_reslogit/) |
| SHOPPER | / | / |Ruiz et al. [[16]](#trident-references) | *SHOPPER* | [#](https://artefactory.github.io/choice-learn/references/basket_models/references_shopper/) |


### Auxiliary tools
Expand Down Expand Up @@ -306,7 +307,8 @@ Choice-Learn has been developed through a collaboration between researchers at t
[12] [ResLogit: A residual neural network logit model for data-driven choice modelling](https://doi.org/10.1016/j.trc.2021.103050), Wong, M.; Farooq, B. (2021)\
[13] [Enhancing Discrete Choice Models with Representation Learning](https://arxiv.org/abs/1812.09747), Sifringer, B.; Lurkin, V.; Alahi, A. (2018)\
[14] [A Customer Choice Model with HALO Effect](https://arxiv.org/abs/1805.01603), Maragheh, R., Y.; Chronopoulou, A.; Davis, J., M. (2018)\
[15] [Modeling Choice via Self-Attention](https://arxiv.org/abs/2311.07607), Ko, J.; Li, A., A. (2023)
[15] [Modeling Choice via Self-Attention](https://arxiv.org/abs/2311.07607), Ko, J.; Li, A., A. (2023)\
[16] [SHOPPER: A Probabilistic Model of Consumer Choice with Substitutes and Complements](https://arxiv.org/abs/1711.03560), Ruiz, F. J. R.; Athey, S.; Blei, D. M. (2019)

### Code and Repositories

Expand All @@ -315,4 +317,5 @@ Choice-Learn has been developed through a collaboration between researchers at t
[1] [RUMnet](https://github.com/antoinedesir/rumnet)\
[7] TasteNet [[Repo1](https://github.com/YafeiHan-MIT/TasteNet-MNL)] [[Repo2](https://github.com/deborahmit/TasteNet-MNL)]\
[12] [ResLogit](https://github.com/LiTrans/reslogit)\
[13] [Learning-MNL](https://github.com/BSifringer/EnhancedDCM)
[13] [Learning-MNL](https://github.com/BSifringer/EnhancedDCM)\
[16] [SHOPPER](https://github.com/franrruiz/shopper-src)
Loading
Loading