4678e49d41959e8c66e656c3b4fca59e2dd11d1f,GA.py,,GA,#,265
Before Change
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
s=solution()
bestIndividual=numpy.zeros(dim)
scores=numpy.random.uniform(0.0, 1.0, PopSize)
bestScore=float("inf")
ga=numpy.random.uniform(0,1,(PopSize,dim)) *(ub-lb)+lb
convergence_curve=numpy.zeros(iters)
print("GA is optimizing \""+objf.__name__+"\"")
timerStart=time.time()
s.startTime=time.strftime("%Y-%m-%d-%H-%M-%S")
for l in range(iters):
//crossover
ga = crossoverPopulaton(ga, scores, PopSize, cp, keep)
//mutation
mutatePopulaton(ga, PopSize, mp, keep, lb, ub)
ga = clearDups(ga, lb, ub)
scores = calculateCost(objf, ga, PopSize, lb, ub)
bestScore = min(scores)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: mortendahl/tf-encrypted
Commit Name: 0be81ada984e231be55e60466da93ba551bcf3a1
Time: 2020-07-28
Author: zhicong303@gmail.com
File Name: tf_encrypted/protocol/aby3/aby3.py
Class Name: ABY3
Method Name: setup_pairwise_randomness
Project Name: KhronosGroup/NNEF-Tools
Commit Name: 2470071fd9da49c6b5a5165d1648e6d04e93777d
Time: 2021-01-14
Author: viktor.gyenes@aimotive.com
File Name: nnef_tools/generate.py
Class Name:
Method Name: main