f76b988862e07b4dcfae78ff8fa98e2e77fc7f1d,examples/nd_example.py,,main,#,51
Before Change
def main():
pop_size = 100
loop = toolz.iterate(toolz.compose(algorithm.evolve, update_fitness), MyNDTree.create_population(pop_size))
populations = list(toolz.take(10, loop))
best = selBest(populations[-1], 1)[0]
print(best)
After Change
pop = update_fitness(MyNDTree.create_population(pop_size))
for gen in range(20):
pop = algorithm.evolve(pop)
pop = update_fitness(pop)
best = selBest(pop, 1)[0]
print(best, best.fitness.values)
if __name__ == "__main__":
main()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
Instances
Project Name: Ambrosys/glyph
Commit Name: f76b988862e07b4dcfae78ff8fa98e2e77fc7f1d
Time: 2017-03-21
Author: mquade@uni-potsdam.de
File Name: examples/nd_example.py
Class Name:
Method Name: main
Project Name: Ambrosys/glyph
Commit Name: f76b988862e07b4dcfae78ff8fa98e2e77fc7f1d
Time: 2017-03-21
Author: mquade@uni-potsdam.de
File Name: examples/structural_constants.py
Class Name:
Method Name: main
Project Name: Ambrosys/glyph
Commit Name: f76b988862e07b4dcfae78ff8fa98e2e77fc7f1d
Time: 2017-03-21
Author: mquade@uni-potsdam.de
File Name: examples/symbolic_regression.py
Class Name:
Method Name: main