Skip to content

Commit

Permalink
Minor correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ahw627 committed Nov 22, 2018
1 parent 35eec8d commit ad92b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GA.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def run(cxpb=0.5,mutpb=0.1,n=10,tour=3,termpb=0.2,pop=10,ngen=10):
#print(hof[0])
#print(type(hof[0]))
#print(hof_aux.append(hof[0]))
return fitness_predictor(hof[0],errors,n)[0]
return hof[0].fitness.values[0]

def average_fitness(N):
return sum([run(cxpb=0.5,mutpb=0.1,n=10,tour=3) for i in range(0,N)])/N
Expand Down

0 comments on commit ad92b01

Please sign in to comment.