Correction problème méthodologique de construction

This commit is contained in:
Antoine JOUBREL 2024-03-10 16:04:16 +00:00
parent f40ae6ead0
commit 4aa781daf0

View File

@ -116,6 +116,9 @@ def dataset_construction(min_date, end_features_date, max_date, directory_path):
df_customer_product[['purchase_date_max', 'purchase_date_min']] = df_customer_product[['purchase_date_max', 'purchase_date_min']].fillna(max_interval)
df_customer_product[['time_between_purchase']] = df_customer_product[['time_between_purchase']].fillna(-1)
# Customers who have neither received an e-mail nor made a purchase during the feature estimation period are removed
df_customer_product = df_customer_product[(df_customer_product['nb_purchases'] > 0) | (df_customer_product['nb_campaigns'] > 0)]
print("Explanatory variable construction : SUCCESS")
# 2. Construction of the explained variable