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)


if __name__ == "__main__":
    main()

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: 4

Non-data size: 7

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: dmlc/dgl
Commit Name: 7156c7163b046686064d7c9de445041870e672bc
Time: 2018-12-01
Author: minjie.wang@nyu.edu
File Name: tutorials/1_first.py
Class Name:
Method Name:


Project Name: rusty1s/pytorch_geometric
Commit Name: 78667257ffe9c2501791d2d7b143f9d820b2a7ee
Time: 2020-03-23
Author: matthias.fey@tu-dortmund.de
File Name: examples/gnn_explainer.py
Class Name:
Method Name:


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