dd1575073ca40d69c9d9f5f0d64e7517e23eba8a,framework/Optimizers/parentSelectors/parentSelectors.py,,rankSelection,#Any#,118

Before Change


  nParents= kwargs["nParents"]
  pop = population.copy()
  
  selectedParent = xr.DataArray(
      np.zeros((nParents,np.shape(pop)[1])),
      dims=["chromosome","Gene"],
      coords={"chromosome":np.arange(nParents),
              "Gene": kwargs["variables"]})
  
  return selectedParent

After Change



  pop = population.copy()
  
  index = np.arange(0,pop.shape[0])
  rank = np.arange(0,pop.shape[0])
  
  data = np.vstack((fitness,index))
  dataOrderedByDecreasingFitness = data[:,(-data[0]).argsort()]
  dataOrderedByDecreasingFitness[0,:] = rank
  dataOrderedByIncreasingPos = dataOrderedByDecreasingFitness[:,dataOrderedByDecreasingFitness[1].argsort()]
  orderedRank = dataOrderedByIncreasingPos[0,:]
  
  selectedParent = rouletteWheel(population, fitness=orderedRank , nParents=kwargs["nParents"])
  
  return selectedParent
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: idaholab/raven
Commit Name: dd1575073ca40d69c9d9f5f0d64e7517e23eba8a
Time: 2020-07-06
Author: diego.mandelli@inl.gov
File Name: framework/Optimizers/parentSelectors/parentSelectors.py
Class Name:
Method Name: rankSelection


Project Name: CellProfiler/CellProfiler
Commit Name: 475722f1825d7c54fd27fb42723874ecc30b8f5d
Time: 2011-02-02
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/reassignobjectnumbers.py
Class Name:
Method Name: copy_labels


Project Name: SPFlow/SPFlow
Commit Name: 3485c83fc9b045356c405fec9008f2ff6220edd7
Time: 2018-09-03
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/experiments/conditional/img_tools.py
Class Name:
Method Name: stitch_imgs


Project Name: deeptools/HiCExplorer
Commit Name: 764312eb30f59e6cc7fbcc62383eda0e192ced5f
Time: 2018-11-19
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/utilities.py
Class Name:
Method Name: expected_interactions