def set_treatment(self, data_train, data_test): # Traitement des donnees treatment = tr.Treatment() data_train = treatment.data_treatment(data_train) data_test = treatment.data_treatment(data_test) return data_train, data_test
import bin.treatment as tr import bin.ridge as rd import seaborn as sns import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix # Récupération des donnees data_opening = op.DataOpening() data_train = data_opening.get_training_data() data_test = data_opening.get_testing_data() data_ref = data_opening.get_referencing_data() # Traitement des donnees treatment = tr.Treatment() data_train = treatment.data_treatment(data_train) data_test = treatment.data_treatment(data_test) # Affiliation des donnees x_train = data_train.drop(["Survived"], axis=1) t_train = data_train["Survived"] x_test = data_test t_test = data_ref["Survived"] # Classification par ridge ridge = rd.Ridge() # Entrainement des donnees ridge.fit(x_train, t_train)