Esempio n. 1
0
    for i in columns:
        sheets[ind].write(0,k,i)
        k+=1   
        
    for mod in range(model_no):
        sheets[ind].write(mod+1,0,'model_{}'.format(mod))

    for train_index,test_index in skf.split(atribute, output):
        
        lst = [
            models.Fair_rew_RF(un_gr, pr_gr),
            models.FAD_class(input_size = inp, num_layers_z = 2, num_layers_y = 2, 
                                      step_z = 1.5, step_y = 1.5),
            models.FAIR_scalar_class(input_size = inp, num_layers_w = 2, step_w = 1.5, 
                     num_layers_A = 1, step_A = 1.5, num_layers_y = 2, step_y = 1.5),
            models.FAIR_betaSF_class(input_size = inp, num_layers_w = 2, step_w = 1.5, 
                     num_layers_A = 1, step_A = 1.5, num_layers_y = 2, step_y = 1.5),
            models.FAIR_Bernoulli_class(input_size = inp, num_layers_w = 2, step_w = 1.5, 
                     num_layers_A = 1, step_A = 1.5, num_layers_y = 2, step_y = 1.5),
            models.FAIR_betaREP_class(input_size = inp, num_layers_w = 2, step_w = 1.5, 
                     num_layers_A = 1, step_A = 1.5, num_layers_y = 2, step_y = 1.5),
            models.FAD_prob_class(flow_length = 2, no_sample = 32,
                                             input_size = inp, num_layers_y = 2, 
                                             step_y = 2, step_z = 2)]
    
        
        
        x_train, x_test = atribute.iloc[train_index,:], atribute.iloc[test_index,:]
        y_train, y_test = output.iloc[train_index], output.iloc[test_index] 
        A_train, A_test = sensitive.iloc[train_index], sensitive.iloc[test_index]  
        data_train, data_test = data.iloc[train_index,:], data.iloc[test_index,:]
        
 models.FAD_class(input_size=inp,
                  num_layers_z=3,
                  num_layers_y=2,
                  step_z=2,
                  step_y=2),
 models.FAIR_scalar_class(input_size=inp,
                          num_layers_w=2,
                          step_w=2,
                          num_layers_A=2,
                          step_A=2,
                          num_layers_y=3,
                          step_y=2),
 models.FAIR_betaSF_class(input_size=inp,
                          num_layers_w=2,
                          step_w=2,
                          num_layers_A=2,
                          step_A=2,
                          num_layers_y=3,
                          step_y=2),
 models.FAIR_Bernoulli_class(input_size=inp,
                             num_layers_w=2,
                             step_w=2,
                             num_layers_A=2,
                             step_A=2,
                             num_layers_y=3,
                             step_y=2),
 models.FAIR_betaREP_class(input_size=inp,
                           num_layers_w=2,
                           step_w=2,
                           num_layers_A=2,
                           step_A=2,