individuals=INDIVIDUALS, mutation_rate=MUPB, priori=bnl) else: bnl = BNloader("./dataset/file_" + str(DATASET) + ".txt", delimiter=",", skiprows=1) G = GA(bnl, individuals=INDIVIDUALS, mutation_rate=MUPB) G.DATASET = DATASET debug_file += "_dataset" + str(DATASET) IND_SIZE = G.BN.nodes**2 # use independent scores (NSGA-2) G.SCRIPT_SCORE = "MAIN_return_the_score_nobic.R" # let's generate almost empty individuals for i, individual in enumerate(pop_deap): new_individual = G.generate_individual(mutations=1) new_individual_list = list( new_individual.adjacency_matrix.reshape((1, IND_SIZE))[0]) #print (individual) #print (new_individual_list) #exit() for j in range(IND_SIZE): individual[j] = new_individual_list[j]