Skip to content

Commit 319ca7b

Browse files
committed
small modifs
1 parent 6e14240 commit 319ca7b

File tree

9 files changed

+67
-129
lines changed

9 files changed

+67
-129
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,5 @@ cython_debug/
172172

173173
# PyPI configuration file
174174
.pypirc
175+
176+
.DS_Store

Makefile

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 62 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,108 @@
1-
#
1+
#
22
<div align="center">
3-
3+
44
<h1>Better Capturing Interactions between Products in Retail: <br/>Revisited Negative Sampling for <br/> Basket Choice Modeling</h1>
55

66
Jules Désir<sup>1</sup>, Vincent Auriau<sup>1, 2</sup>, Martin Možina<sup>3</sup> and Emmanuel Malherbe<sup>1</sup>
77

88
<sup>1</sup> <sub> [Artefact Research Center](https://www.artefact.com/technologies/artefact-research-center/), </sub> <sup>2</sup> <sub>[*MICS*](https://arcade.pages.centralesupelec.fr/) - CentraleSupélec,</sub> <sup>3</sup> <sub> [Fortenova Grupa](https://fortenova.hr/en/home/groups-strength/) </sub>
99

10-
In [ECML-PKDD 2025](). <br>
11-
[[Full Paper]](./paper.pdf) [[Appendices]](./appendices.pdf) [[Oral Presentation]]()<br>
12-
13-
[![CI status](https://github.com/artefactory/alea-carta-est/actions/workflows/ci.yaml/badge.svg)](https://github.com/artefactory/alea-carta-est/actions/workflows/ci.yaml?query=branch%3Amain)
14-
[![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-blue.svg)]()
1510

16-
[![Linting , formatting, imports sorting: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
17-
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
18-
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-informational?logo=pre-commit&logoColor=white)](https://github.com/artefactory/alea-carta-est/blob/main/.pre-commit-config.yaml)
11+
In [ECML-PKDD 2025](https://ecmlpkdd.org/2025/). <br>
12+
[[Full Paper]](#) [[Appendices]](./Appendices.pdf) [[Oral Presentation]](#)<br>
1913

2014
</div>
2115

22-
> **Abstract:** *Brick-and-mortar retailers face many different challenges that involve understanding thoroughly its products catalog and customer preferences. In particular, assortment optimization - proposing the ideal mix of products - and promotion planning hold a pivotal role in their strategy. By leveraging sales data, retailers can make informed decisions on which products to sell and how to manage inventory, based on customer preferences as well as regional and seasonal trends. It is especially crucial to capture interactions between products, in order to minimize the number of items that cannibalize each other’s sales and to ensure that complementary products, which are often purchased together, are conjointly available and sold across all stores. In this paper, we propose a model of shopping basket that learns embeddings to represent interactions between products, prices and stores. Our model is built to uncover sales patterns from very large transaction datasets. In particular, the optimization loss is computed with random negative samples in order to overcome the computational bottlenecks that arise with large number of items. Our experiments on synthetic data show the efficiency of drawing such negative samples based on the actual assortment of available products, with better results than approaches from the literature. We also validate our approach by training and evaluating our model on a dataset composed of billions of transactions from a leading European retail company1. Our model showcases promising applications in the sector of retail, with enriched interfaces to efficiently support category managers.*
16+
> **Abstract:** *Brick-and-mortar retailers face many different challenges that involve understanding thoroughly its products catalog and customer preferences. In particular, assortment optimization - proposing the ideal mix of products - and promotion planning hold a pivotal role in their strategy. By leveraging sales data, retailers can make informed decisions on which products to sell and how to manage inventory, based on customer preferences as well as regional and seasonal trends. It is especially crucial to capture interactions between products, in order to minimize the number of items that cannibalize each other’s sales and to ensure that complementary products, which are often purchased together, are conjointly available and sold across all stores. In this paper, we propose a model of shopping basket that learns embeddings to represent interactions between products, prices and stores. Our model is built to uncover sales patterns from very large transaction datasets. In particular, the optimization loss is computed with random negative samples in order to overcome the computational bottlenecks that arise with large number of items. Our experiments on synthetic data show the efficiency of drawing such negative samples based on the actual assortment of available products, with better results than approaches from the literature. We also validate our approach by training and evaluating our model on a dataset composed of billions of transactions from a leading European retail company. Our model showcases promising applications in the sector of retail, with enriched interfaces to efficiently support category managers.*
2317

24-
## Table of Contents
25-
- [Table of Contents](#table-of-contents)
26-
- [Installation](#installation)
27-
- [Synthetic Experiments](#synthetic-experiments)
28-
- [Train the model on your own dataset](#train-on-own-dataset)
29-
- [License](#license)
30-
- [Citation](#citation)
31-
- [Repository Structure](#repository-structure)
18+
# 🌿 Installation
3219

33-
## Installation
20+
First you can clone the repository:
21+
22+
```bash
23+
git clone git@github.com:artefactory/alea-carta-est.git
24+
```
3425

35-
To install the required packages in a virtual environment (see *requirements.txt* and *requirements-developer.txt*), run the following command:
26+
To import and train the models you will need the [choice-learn](https://github.com/artefactory/choice-learn) library. You can pip install it:
3627

3728
```bash
38-
make install
29+
pip install choice-learn
3930
```
4031

41-
A complete list of available commands can be found using the following command:
32+
If you want to specifically run the experiments, you can install all the dependencies at once with:
4233

4334
```bash
44-
make help
35+
pip install -r requirements.txt
4536
```
4637

47-
## Synthetic Experiments
38+
# 🌿 Synthetic Experiments
4839

49-
TODO
40+
# 🌿 Train the model on your own dataset
5041

51-
## Train the model on your own dataset
42+
# 🌿 Citation
5243

53-
TODO
44+
If you find our work or any of its feature useful for your research, consider starring the repository and citing our paper:
5445

55-
## License
46+
<a href="https://ecmlpkdd.org/">
47+
<img align="left" width="100"src="https://ecmlpkdd-storage.s3.eu-central-1.amazonaws.com/ECML_1_e012008d41.png" />
48+
</a>
49+
50+
```bash
51+
@article{
52+
doi = {},
53+
url = {},
54+
year = {},
55+
publisher = {},
56+
volume = {},
57+
number = {},
58+
pages = {},
59+
author = {},
60+
title = {},
61+
journal = {} }
62+
```
63+
64+
If you make use of the choice-learn library you also cite us:
65+
If you consider this package or any of its feature useful for your research, consider citing our [paper](https://joss.theoj.org/papers/10.21105/joss.06899):
5666

57-
TODO
67+
<a href="https://joss.theoj.org/papers/10.21105/joss.06899">
68+
<img align="left" width="100"src="https://github.com/openjournals/joss/blob/main/docs/logos/joss-logo.png?raw=true" />
69+
</a>
5870

59-
## Citation
71+
```bash
72+
@article{Auriau2024,
73+
doi = {10.21105/joss.06899},
74+
url = {https://doi.org/10.21105/joss.06899},
75+
year = {2024},
76+
publisher = {The Open Journal},
77+
volume = {9},
78+
number = {101},
79+
pages = {6899},
80+
author = {Vincent Auriau and Ali Aouad and Antoine Désir and Emmanuel Malherbe},
81+
title = {Choice-Learn: Large-scale choice modeling for operational contexts through the lens of machine learning},
82+
journal = {Journal of Open Source Software} }
83+
```
6084

6185
<p align="center">
6286
<a href="https://www.artefact.com/data-consulting-transformation/artefact-research-center/">
63-
<img src="./doc/logo_arc.png" height="60" />
87+
<img src="https://raw.githubusercontent.com/artefactory/alea-carta-est/main/doc/logo_arc.png" height="60" />
6488
</a>
6589
&emsp;
6690
&emsp;
6791
<a href="https://mics.centralesupelec.fr/">
68-
<img src="./doc/logo_CS.png" height="65" />
92+
<img src="https://raw.githubusercontent.com/artefactory/alea-carta-est/main/doc/logo_CS.png" height="65" />
6993
</a>
7094
&emsp;
7195
&emsp;
7296
<a href="https://www.universite-paris-saclay.fr/">
73-
<img src="./doc/logo_paris_saclay.png" height="65" />
97+
<img src="https://raw.githubusercontent.com/artefactory/alea-carta-est/main/doc/logo_paris_saclay.png" height="65" />
7498
</a>
75-
<a href="https://mics.centralesupelec.fr/">
76-
<img src="./doc/fortenova.png" height="65" />
99+
<a href="https://fortenova.hr/en/home/">
100+
<img src="https://raw.githubusercontent.com/artefactory/alea-carta-est/main/doc/fortenova.png" height="65" />
77101
</a>
78102
&emsp;
79103
&emsp;
80104
</p>
81105

82-
## Repository Structure
83106

84-
```
85-
.
86-
├── .github <- GitHub Actions workflows
87-
├── alea_carta_est <- Python modules
88-
├── bin <- Bash files
89-
├── doc <- Images for the repository
90-
└── notebooks <- Jupyter notebooks
91-
```
107+
## License
108+
The use of this software is under the MIT license, with no limitation of usage, including for commercial applications.

alea_carta_est/.gitkeep

Whitespace-only changes.

bin/install_with_conda.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

bin/install_with_venv.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "alea-carta-est"
77
authors = [
8-
{ name = "Jules Désir", email = "jules.desir@mines-paris.org" },
8+
{ name = "Jules Désir", email = "jules.desir@artefact.com" },
99
{ name = "Vincent Auriau", email = "vincent.auriau@artefact.com" },
1010
]
1111
description = "Repository for the paper 'Better Capturing Interactions between Products in Retail: Revisited Negative Sampling for Basket Choice Modeling'"

requirements-developer.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
-r requirements.txt
22
ruff==0.1.2
33
pre-commit==3.3.3
4-
pytest==7.3.2
5-
pytest-cov
6-
pytest-xdist
7-
python-markdown-math
84
bandit==1.7.5
9-
nbstripout==0.6.1
10-
ipykernel==6.24.0
115
typing>=3.7
126
# Without the typing module, advanced type hints like list[str]
137
# are not available on Python 3.8

requirements.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
numpy>=1.24
2-
pandas>=1.5
3-
tensorflow>=2.18, <2.19
4-
tensorflow_probability>=0.22
5-
tf_keras>=2.18, <2.19
6-
tqdm>=4.0
1+
choice-learn
2+
matplotlib

0 commit comments

Comments
 (0)