e0e90bab32976898a01bb2da29c3002b83596425,GA.py,,GA,#,334

Before Change


    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__+"\"")  

After Change


    if not isinstance(lb, list):
        lb = [lb] * dim
    if not isinstance(ub, list):
        ub = [ub] * dim
        
    bestIndividual=numpy.zeros(dim)    
    scores=numpy.random.uniform(0.0, 1.0, popSize) 
    bestScore=float("inf")
    
    ga = numpy.zeros((popSize, dim))
    for i in range(dim):
        ga[:, i]=numpy.random.uniform(0,1,popSize) * (ub[i] - lb[i]) + lb[i]
    convergence_curve=numpy.zeros(iters)
    
    print("GA is optimizing  \""+objf.__name__+"\"")  
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: 7ossam81/EvoloPy
Commit Name: e0e90bab32976898a01bb2da29c3002b83596425
Time: 2019-06-18
Author: raneem.qaddoura@gmail.com
File Name: GA.py
Class Name:
Method Name: GA


Project Name: hyperopt/hyperopt-sklearn
Commit Name: 897e1f85ca99903641763ca399afa25aa1ff68c8
Time: 2014-02-14
Author: james.bergstra@gmail.com
File Name: hpsklearn/components.py
Class Name:
Method Name: svc_poly


Project Name: zueve/neurolab
Commit Name: 8263b2f073ae02e3ec65d61cb7751d1b0fae94c5
Time: 2011-11-18
Author: zueves@gmail.com@14c53a28-ea53-75df-6c54-14096e524f45
File Name: neurolab/init.py
Class Name:
Method Name: initwb_nw