73176f1726856ee4e5674092f89a7582f6f8a16e,deeppavlov/models/evolution/evolution_param_generator.py,ParamsEvolution,crossover,#ParamsEvolution#Any#Any#,300
Before Change
offsprings = []
scores = np.array(scores, dtype="float")
if np.sum(scores) < self.eps:
scores = [self.eps for _ in range(self.population_size)]
probas_to_be_parent = scores / np.sum(scores)
intervals = np.array([np.sum(probas_to_be_parent[:i]) for i in range(self.population_size)])
for i in range(self.population_size - self.n_saved_best_pretrained):
After Change
offsprings = []
ranges = self.range_scores(scores)
a = 1. / (1. - self.population_size)
b = self.population_size / (self.population_size - 1.)
probas_to_be_parent = (a * ranges + b) / np.sum(a * ranges + b)
intervals = np.array([np.sum(probas_to_be_parent[:i]) for i in range(self.population_size)])
for i in range(self.population_size - self.n_saved_best_pretrained):
rs = np.random.random(2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: deepmipt/DeepPavlov
Commit Name: 73176f1726856ee4e5674092f89a7582f6f8a16e
Time: 2018-06-20
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/evolution_param_generator.py
Class Name: ParamsEvolution
Method Name: crossover
Project Name: chainer/chainercv
Commit Name: a12ebae433a4d1b3e9132650333a4685f7c5110d
Time: 2017-05-07
Author: Hakuyume@users.noreply.github.com
File Name: tests/links_tests/ssd_tests/test_ssd.py
Class Name: TestSSD
Method Name: setUp
Project Name: deepmipt/DeepPavlov
Commit Name: 93cbc631abd8671e5fe3d6a9360f49426ffa8e58
Time: 2018-06-26
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/evolution_param_generator.py
Class Name: ParamsEvolution
Method Name: crossover