44bdf9be3b913a1a0e90115e45edbee192d01b90,deslib/des/probabilistic.py,Probabilistic,estimate_competence,#Probabilistic#,113

Before Change


            // Check if the dynamic frienemy pruning (DFP) should be used used
            if self.DFP_mask[clf_index]:
                temp_competence = np.multiply(self.C_src[:, clf_index], potential_dists)
                competences[clf_index] = np.sum(temp_competence)/sum_potential

        return competences

After Change


        sum_potential = np.sum(potential_dists, axis=1)

        competences = np.einsum("ijk,ij->ik", self.C_src[np.newaxis, :, :], potential_dists)
        competences = competences/sum_potential.reshape(-1, 1)

        // competences = np.zeros(self.n_classifiers)
        // for clf_index in range(self.n_classifiers):
        //     // Check if the dynamic frienemy pruning (DFP) should be used used
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/DESlib
Commit Name: 44bdf9be3b913a1a0e90115e45edbee192d01b90
Time: 2018-03-31
Author: rafaelmenelau@gmail.com
File Name: deslib/des/probabilistic.py
Class Name: Probabilistic
Method Name: estimate_competence


Project Name: jakeret/tf_unet
Commit Name: 6ff96d4f10e2e85d0cb9745776eac64713c51256
Time: 2016-08-24
Author: jakeret@phys.ethz.ch
File Name: tf_unet/unet.py
Class Name: Unet
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: 25508c13627f06510f3cab96d742360b0187640a
Time: 2019-06-29
Author: carole.sudre@kcl.ac.uk
File Name: tests/windows_aggregator_grid_v2_test.py
Class Name: GridSamplesAggregatorTest
Method Name: test_init_2d_mo


Project Name: astroML/astroML
Commit Name: 4e70cb5fc9a9494e866ccd7d2e1a9046091b6337
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__