f0c15f219b0761b14329ddd416cda82fa4bae841,deslib/dcs/mcb.py,MCB,estimate_competence,#MCB#,98

Before Change


            // Check if the dynamic frienemy pruning (DFP) should be used used
            if self.DFP_mask[clf_index]:
                clf_competence = [self.processed_dsel[sample_idx][clf_index] for sample_idx in selected_idx]
                competences[clf_index] = np.mean(np.array(clf_competence))

        return competences

After Change



        // Use the masked array mean to take into account the removed neighbors
        processed_pred = np.ma.MaskedArray(self.processed_dsel[idx_neighbors, :], mask=~boolean_mask)
        competences = np.ma.mean(processed_pred, axis=1)

        return competences
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/DESlib
Commit Name: f0c15f219b0761b14329ddd416cda82fa4bae841
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/mcb.py
Class Name: MCB
Method Name: estimate_competence


Project Name: scikit-image/scikit-image
Commit Name: f30789aaf1f49e25059bc39d45656435d99c0677
Time: 2020-04-07
Author: rfezzani@gmail.com
File Name: skimage/measure/tests/test_profile.py
Class Name:
Method Name: test_reduce_func_mean


Project Name: scikit-learn-contrib/DESlib
Commit Name: 85d5c30d2186d07857d1f0fb7c269eb08d2b7d79
Time: 2018-04-07
Author: rafaelmenelau@gmail.com
File Name: deslib/des/des_clustering.py
Class Name: DESClustering
Method Name: fit