test some changes

This commit is contained in:
Thomas PIQUE 2024-04-03 18:37:19 +00:00
parent acf7621d9a
commit 15f950d87f

View File

@ -1,7 +1,10 @@
# Business data challenge 2023-2024 | ENSAE Paris
# Business data challenge 2023-2024 | ENSAE Paris <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/LOGO-ENSAE.png/900px-LOGO-ENSAE.png" width="100">
# Arenametrix : customer segmentation
## Team 1 :
<img src="https://dev.arenametrix.fr/assets/logo_ax-806e8204f49bcc2c5e8cd34e9748d16a6038404e37fdb2dc9d61455bb06c6461.png" width=300>
## Team 1
* Antoine JOUBREL
* Alexis REVELLE
@ -9,11 +12,20 @@
* Thomas PIQUÉ
## Coaches :
## Coaches
* Elia LAPENTA
* Michael VISSER
## Datastorm support team
* Patrice MICHEL
* Hassan MAISSORO
## Microeconomics coordinator
* Yuanzhe TANG
### Description of the problematic
The goal of this project is to create segments of customers from 15 companies belonging to 3 different types of activities (sports companies, museum, and music companies).
@ -23,11 +35,14 @@ We opted for a sector-based approach, which means that 3 segmentations have been
As the segments have to be linked to a probability of future purchase, we directly used the probability of purchase during the incoming year to make segments. The first step of the modelization is a pipeline that fits 3 ML models (naive bayes, random forest, and logistic regression) on the data to predict whether the customer will purchase during the year. We then use the probability of purchase estimated to split the customers into 4 segments. For each segment, we can estimate the potential number of tickets and revenue for the incoming year.
### How run the code
- run 0_1_Input_cleaning.py to clean the raw data and generate dataframes that will be used to build datasets with insightful variables.
- run 0_2_Dataset_construction.py.
- run 0_3_General_modelization_dataset.py to generate test and train sets for the 3 types of activities.
- run the script 0_4_Generate_stat_desc.py to generate graphics describing the data
- run 0_5_Machine_Learning.py. 3 ML models will be fitted on the data, and results will be exported for all 3 types of activities
- run 0_6_Segmentation.py. The test set will be fitted with the optimal parameters computed previously. That will allow to compute a propensity score (probability of a future purchase). Segmentation is performed according to the scores provided. This scripts exports graphics describing the marketing personae associated to the segments as well as their business value.
- run 0_7_CA_segment.py. The scores will be adjusted to better fit the overall probability of a purchase. This score adjusted is used to estimate the number of tickets sold and the revenue generated during the incoming year.
Codes have to be run in an order following their numbers. Each of them is described below :
- 1_Input_cleaning.py \
clean the raw data and generate dataframes that will be used to build datasets with insightful variables.
- 2_Dataset_generation.py.
- 3_Modelling_datasets.py to generate test and train sets for the 3 types of activities.
- 4_Descriptive_statistics.py to generate graphics describing the data
- 5_Modelling.py. 3 ML models will be fitted on the data, and results will be exported for all 3 types of activities
- 6_Segmentation_and_Marketing_Personae.py. The test set will be fitted with the optimal parameters computed previously. That will allow to compute a propensity score (probability of a future purchase). Segmentation is performed according to the scores provided. This scripts exports graphics describing the marketing personae associated to the segments as well as their business value.
- 7_Sales_Forecast.py. The scores will be adjusted to better fit the overall probability of a purchase. This score adjusted is used to estimate, for each customer, the number of tickets sold and the revenue generated during the incoming year. Results are aggregated at segment level.