Merge pull request 'fix preproc' (#13) from generalization into main

Reviewed-on: #13
This commit is contained in:
Alexis REVELLE 2024-03-28 12:38:00 +01:00
commit 0bd29e3a81

View File

@ -114,10 +114,10 @@ def preprocess(type_of_model, type_of_activity):
binary_features = ['gender_female', 'gender_male', 'achat_internet', 'categorie_age_0_10', 'categorie_age_10_20', 'categorie_age_20_30','categorie_age_30_40', binary_features = ['gender_female', 'gender_male', 'achat_internet', 'categorie_age_0_10', 'categorie_age_10_20', 'categorie_age_20_30','categorie_age_30_40',
'categorie_age_40_50', 'categorie_age_50_60', 'categorie_age_60_70', 'categorie_age_70_80', 'categorie_age_plus_80','categorie_age_inconnue', 'categorie_age_40_50', 'categorie_age_50_60', 'categorie_age_60_70', 'categorie_age_70_80', 'categorie_age_plus_80','categorie_age_inconnue',
'country_fr', 'is_profession_known', 'is_zipcode_known', 'opt_in'] 'country_fr', 'is_profession_known', 'is_zipcode_known', 'opt_in']
"""
if type_of_activity=='musee': if type_of_activity=='musee':
binary_features.pop('time_to_open') numeric_features.pop('time_to_open')
"""
if type_of_model=='premium': if type_of_model=='premium':
if type_of_activity=='musique': if type_of_activity=='musique':
binary_features.extend(['target_optin', 'target_newsletter']) binary_features.extend(['target_optin', 'target_newsletter'])