Example #1
0
 def button_search(self):
     # Utilise la classe Traitement pour faire la recherche
     g = Traitement(self.searchd.get(), self.searchf.get(),
                    self.searchl.get(), self.searchdo.get())
     print(g)
     g.search()
     messagebox.showinfo("Sauvegarde", lecture_txt())
Example #2
0
    def __init__(self,base,nmois,id,cv_primary,cv_i,taille_maille,classifieur_fr=None,classifieur_fs=None,coef=0,**kwargs):

        cm = kwargs.get('cm',plt.cm.RdBu)
        cm_bright = kwargs.get('cm_bright', ListedColormap(['#FF0000','#0000FF']))
        marker_size = kwargs.get('marker_size',None)
        figsize = kwargs.get('figsize',None)

        Visualizer.__init__(taille_maille,coef,cm=cm,cm_bright=cm_bright,marker_size=marker_size,figsize=figsize)

        std = kwargs.get('std',True)

        self.X_fs,self.X_val,self.Y_val,self.X_test,self.Y_test = proc.import_val_test_XY_cv_fs(base,id,cv_primary,cv_i,nmois=nmois,std=std,classifieur_fr=classifieur_fr,classifieur_fs=classifieur_fs)
Example #3
0
def generate_CV_sets(dataSet, replace=False):

    X = proc.import_X(dataSet.base, dataSet.nmois, std=dataSet.std)
    Y = proc.import_Y(dataSet.base, dataSet.nmois)

    for id in dataSet.id_list:

        df = pd.DataFrame(index=X.index,
                          columns=np.arange(1,
                                            dataSet.cv_primary.get_n_splits()))

        for i, (IndexTrain_iloc,
                IndexTest) in enumerate(dataSet.cv_primary.split(X, Y)):

            IndexTrain = X.iloc[IndexTrain_iloc].index

            Index = [i in IndexTrain for i in X.index]
            df[i] = Index

        foldername = foldername('CV_primary', dataSet.base)
        filename = dataSet.get_filename(id)
        df.to_pickle(foldername + filename)
Example #4
0
 def button_search(self):
     print("Boutton Rechercher")
     g = Traitement(self.searchd.get(), self.searchf.get(),
                    self.searchl.get(), self.searchdo.get())
     print(g)
Example #5
0
 def traitement(self,MainWindow):
     self.traitementImage = QtWidgets.QMainWindow()
     self.ui = traitement.Ui_traitementImage()
     self.ui.setupUi(self.traitementImage)
     self.traitementImage.show()
     MainWindow.close()
Example #6
0
    def display_base(self,n_dimensions,base,nmois,id,cv_primary,cv_i,classifieur_fr=None,classifieur_fs=None,std=True):

        X_fs,X_val,Y_val,X_test,Y_test = proc.import_val_test_XY_cv_fs(base,id,cv_primary,cv_i,nmois=nmois,std=std,classifieur_fr=classifieur_fr,classifieur_fs=classifieur_fs)

        self.display_XY(X_fs,X_val,Y_val,X_test,Y_test)
Example #7
0
    def import_Y(self):

        return proc.import_Y(self.base, self.nmois)
Example #8
0
    def import_X(self):

        return proc.import_X(self.base, self.nmois, self.std)