4abda80dd12518e6bfdc44d067566a3e6947e906,deslib/dcs/a_priori.py,APriori,estimate_competence,#APriori#,91

Before Change


                    target = self.DSEL_target[index]
                    // get the post_prob for the correct class
                    //post_prob = self._get_scores_dsel(clf_index, index)[target]
                    post_prob = self.dsel_scores[index, clf_index, target]

                    result[counter] = (post_prob * dists_normalized[counter])

After Change


        scores_target_class = self.dsel_scores[idx_neighbors, :, self.DSEL_target[idx_neighbors]]

        // Multiply the scores obtained for the correct class to the distances of each corresponding neighbor
        scores_target_class *= np.expand_dims(dists_normalized, axis=2)

        // Sum the scores obtained for each neighbor and divide by the sum of all distances
        competences = np.sum(scores_target_class, axis=1)/ np.sum(dists_normalized, axis=1)

        // competences = np.zeros(self.n_classifiers)
        // for clf_index in range(self.n_classifiers):
        //
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: scikit-learn-contrib/DESlib
Commit Name: 4abda80dd12518e6bfdc44d067566a3e6947e906
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/a_priori.py
Class Name: APriori
Method Name: estimate_competence


Project Name: kundajelab/dragonn
Commit Name: 172e1c71ff73c351b195c47ea6a89a24cc83e259
Time: 2019-07-10
Author: annashcherbina@gmail.com
File Name: dragonn/interpret/ism.py
Class Name:
Method Name: in_silico_mutagenesis


Project Name: XifengGuo/CapsNet-Keras
Commit Name: 80dd4096ed186e706775adbe3663b46d719efdb0
Time: 2017-10-31
Author: guoxifeng1990@163.com
File Name: capsulelayers.py
Class Name: CapsuleLayer
Method Name: call


Project Name: kbardool/keras-frcnn
Commit Name: 5d69373190832c077e0d659feedb7d4840525db7
Time: 2017-02-13
Author: yannhenon@gmail.com
File Name: keras_frcnn/data_generators.py
Class Name:
Method Name: calcY