078b2512f26bfb20aa3ecbb6a065008bf7d45753,framework/Optimizers/fitness/fitness.py,,invLinear,#Any#,22

Before Change


    penalty = kwargs["penalty"]

  objVar = kwargs["objVar"]
  obj = eval(str("rlz."+objVar+".data"))
  fitness = 1/(a * obj + b * penalty)
  return fitness

__fitness = {}

After Change



  objVar = kwargs["objVar"]
  // Intializing fitness
  fitness = xr.DataArray(np.zeros((eval("rlz[\"" + objVar + "\"].size"))),
                              dims=["chromosome"],
                              coords={"chromosome": np.arange(eval("rlz[\"" + objVar + "\"].size"))})
  for i in range(eval("rlz[\"" + objVar + "\"].size")):
    obj = eval("rlz[\"" + objVar + "\"].data[i]")//.data
    fitness[i] = 1/(a * obj + b * penalty)
  return fitness
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: idaholab/raven
Commit Name: 078b2512f26bfb20aa3ecbb6a065008bf7d45753
Time: 2020-06-30
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/fitness/fitness.py
Class Name:
Method Name: invLinear


Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 4586366c1018257dd448d62f1fc7534e3f5a4338
Time: 2017-11-23
Author: ikostrikov@gmail.com
File Name: enjoy.py
Class Name:
Method Name:


Project Name: rodluger/starry
Commit Name: 141903a21846d54aaf09aa95a3bcdd8b673ee116
Time: 2019-02-05
Author: rodluger@gmail.com
File Name: starry/ops/theano_op.py
Class Name: StarryGradOp
Method Name: perform


Project Name: osmr/imgclsmob
Commit Name: 8cc023c568f2cdcdf5c34c5fa1b76090073bca73
Time: 2018-12-04
Author: osemery@gmail.com
File Name: gluon/gluoncv2/models/resattnet.py
Class Name:
Method Name: _test