e25ce99878d2b5c151ed8fde92276fbb2cb338b2,deslib/des/knora_u.py,KNORAU,select,#KNORAU#,99

Before Change


        if np.sum(weights) == 0:
            weights = np.ones(self.n_classifiers, dtype=int)

        votes = np.array([], dtype=int)
        for clf_idx, clf in enumerate(self.pool_classifiers):
            votes = np.hstack((votes, np.ones(weights[clf_idx], dtype=int) * clf.predict(query)[0]))

        return votes

After Change


        votes : the number of votes for each class
        // 
        // Select classifier if it correctly classified at least one sample
        indices = (competence > 0)

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

        // weights = self.estimate_competence(query)
        // if np.sum(weights) == 0:
        //     weights = np.ones(self.n_classifiers, dtype=int)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: scikit-learn-contrib/DESlib
Commit Name: e25ce99878d2b5c151ed8fde92276fbb2cb338b2
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/des/knora_u.py
Class Name: KNORAU
Method Name: select


Project Name: scikit-learn-contrib/DESlib
Commit Name: e25ce99878d2b5c151ed8fde92276fbb2cb338b2
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/des/knop.py
Class Name: KNOP
Method Name: select


Project Name: scikit-learn-contrib/DESlib
Commit Name: e25ce99878d2b5c151ed8fde92276fbb2cb338b2
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/des/knora_u.py
Class Name: KNORAU
Method Name: select


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