93cbc631abd8671e5fe3d6a9360f49426ffa8e58,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


        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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: maciejkula/spotlight
Commit Name: bc51dbc0c56f68ed30857755026633f78eef1ae8
Time: 2017-08-20
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward


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