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()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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/symbolic_regression.py
Class Name:
Method Name: main


Project Name: onnx/onnx-coreml
Commit Name: ffed6ce438fc1ebdc8054d307ffdfce4bbf2f7f1
Time: 2019-09-03
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_transformers.py
Class Name: GatherConstantRemover
Method Name: __call__