-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: main
Are you sure you want to change the base?
Basket models #216
Conversation
Coverage Report for Python 3.10
|
Coverage Report for Python 3.11
|
Coverage Report for Python 3.12
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of comments, to be discussed :)
…t when computing item utilities
Shape must be (n_items,) | ||
""" | ||
# Prevent unintended side effects from in-place modifications | ||
availability_matrix_copy = availability_matrix.copy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je comprends que ce soit là, si on arrive à l'enlever c'est mieux =)
class TripDataset: | ||
"""Class for a dataset of trips.""" | ||
|
||
def __init__(self, trips: list[Trip], assortments: dict[int, np.ndarray]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
les assortments pourraient être des FeaturesStorage -> parlons en :)
|
||
|
||
def from_csv( | ||
train_file: str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be a method of the TripDataset class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then trip_preprocessing.py should be deleted?
There are only 3 functions in this file:
- from_csv
- csv_to_df and map_indexes (2 short functions which don't justify on their own the existence of trip_preprocesing.py and could be moved to the folder choice_learn/basket_models/utils if from_csv is moved to trip_dataset.py)
…/test in one shot
Description of the goal of the PR
Description: add SHOPPER model and Trip / TripDataset data structures
Changes this PR introduces (fill it before implementation)
Checklist before requesting a review