4678e49d41959e8c66e656c3b4fca59e2dd11d1f,GA.py,,GA,#,265
Before Change
for l in range(iters):
//Loop through chromosomes in population
for i in range(0,PopSize):
// Return back the search agents that go beyond the boundaries of the search space
ga[i,:]=numpy.clip(ga[i,:], lb, ub)
// Calculate objective function for each search agent
fitness=objf(ga[i,:])
scores[i] = fitness
if(bestScore>fitness):
bestScore=fitness
bestIndividual=numpy.copy(ga[i,:])
//Apply evolutionary operators to chromosomes
ga = runOperators(ga, scores, bestIndividual, bestScore, cp, mp, PopSize, lb, ub)
convergence_curve[l]=bestScore
After Change
scores = calculateCost(objf, ga, PopSize, lb, ub)
bestScore = min(scores)
//Sort from best to worst
ga, scores = sortPopulation(ga, scores)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: 7ossam81/EvoloPy
Commit Name: 4678e49d41959e8c66e656c3b4fca59e2dd11d1f
Time: 2019-03-08
Author: raneem.qaddoura@gmail.com
File Name: GA.py
Class Name:
Method Name: GA
Project Name: fabianp/mord
Commit Name: 407a5112ab430db6f23fc4317a7400ada797d274
Time: 2015-10-21
Author: f@bianp.net
File Name: examples/bench.py
Class Name:
Method Name:
Project Name: chartbeat-labs/textacy
Commit Name: eaaf2bad32af4bda1a98d434530926bb6a001230
Time: 2019-08-23
Author: burtdewilde@gmail.com
File Name: textacy/augmentation/transformations.py
Class Name:
Method Name: insert_synonyms