generalization #6

Merged
ajoubrel-ensae merged 5 commits from generalization into main 2024-02-29 20:26:00 +01:00
Showing only changes of commit 9c0aff85e5 - Show all commits

View File

@ -20,8 +20,8 @@ exec(open('0_KPI_functions.py').read())
warnings.filterwarnings('ignore')
# functions
def generate_test_set():
file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Test_set")
def generate_test_set(type_of_comp):
file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Test_set")
test_set = pd.DataFrame()
for file in file_path_list:
print(file)
@ -31,8 +31,8 @@ def generate_test_set():
return test_set
def generate_train_set():
file_path_list = fs.ls("projet-bdc2324-team1/Generalization/sport/Train_set")
def generate_train_set(type_of_comp):
file_path_list = fs.ls(f"projet-bdc2324-team1/Generalization/{type_of_comp}/Train_set")
train_set = pd.DataFrame()
for file in file_path_list:
print(file)
@ -46,8 +46,8 @@ type_of_comp = input('Choisissez le type de compagnie : sport ? musique ? musee
BUCKET_OUT = f'projet-bdc2324-team1/Generalization/{type_of_comp}/'
# create test and train datasets
test_set = generate_test_set()
train_set = generate_train_set()
test_set = generate_test_set(type_of_comp)
train_set = generate_train_set(type_of_comp)
# Exportation test set
FILE_KEY_OUT_S3 = "Test_set.csv"