cd1a5446ce793d09f28d021c466a279301eb51f0,deslib/des/meta_des.py,METADES,select,#METADES#Any#,294

Before Change


        -------
        indices : the indices of the selected base classifiers
        
        indices = [idx for idx, _ in enumerate(competences) if competences[idx] > self.gamma]

        // if no classifier was selected, use the whole pool
        if len(indices) == 0:
            indices = list(range(self.n_classifiers))

        return indices

    def estimate_competence(self, query, predictions=None):
        Estimate the competence of each base classifier :math:`c_i`

After Change



        
        if competences.ndim < 2:
            competences = competences.reshape(1, -1)

        selected_classifiers = (competences > self.selection_threshold)
        // For the rows that are all False (i.e., no base classifier was selected, select all classifiers (all True)
        selected_classifiers[~np.any(selected_classifiers, axis=1), :] = True

        return selected_classifiers
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: scikit-learn-contrib/DESlib
Commit Name: cd1a5446ce793d09f28d021c466a279301eb51f0
Time: 2018-04-01
Author: rafaelmenelau@gmail.com
File Name: deslib/des/meta_des.py
Class Name: METADES
Method Name: select


Project Name: spectralpython/spectral
Commit Name: 0817e41d3d104da9a8e4ffb84d12fd72e5687434
Time: 2017-03-26
Author: thomas.boggs@gmail.com
File Name: spectral/graphics/spypylab.py
Class Name:
Method Name: plot


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