cd1a5446ce793d09f28d021c466a279301eb51f0,deslib/des/meta_des.py,METADES,estimate_competence,#METADES#Any#Any#,315

Before Change


        
        _, idx_neighbors = self._get_region_competence(query)
        _, idx_neighbors_op = self._get_similar_out_profiles(query)
        vectors = []
        for clf_index, clf in enumerate(self.pool_classifiers):
            // Check if the dynamic frienemy pruning (DFP) should be used used
                vectors.append(self.compute_meta_features(query, idx_neighbors, idx_neighbors_op, clf, clf_index))

        vectors = np.array(vectors)
        if isinstance(self.meta_classifier, MultinomialNB):
            vectors = np.digitize(vectors, self.bins)

After Change


        // Digitize the data if a Multinomial NB is used as the meta-classifier
        if isinstance(self.meta_classifier, MultinomialNB):

            meta_feature_vectors = np.digitize(meta_feature_vectors, np.linspace(0.1, 1, 10))

        // Get the probability for class 1 (Competent)
        competences = self.meta_classifier.predict_proba(meta_feature_vectors)[:, 1]

        // Reshape the array from 1D [n_samples x n_classifiers] to 2D [n_samples, n_classifiers]
        competences = competences.reshape(-1, self.n_classifiers)
        if self.DFP:
            competences = competences * self.DFP_mask

        return competences
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: estimate_competence


Project Name: bokeh/bokeh
Commit Name: a6e3f06dff54fe4f34bf02a81e53852fa95b227d
Time: 2015-08-30
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/bar_builder.py
Class Name: BarGlyph
Method Name: __dodge__


Project Name: danforthcenter/plantcv
Commit Name: 96c26bd09d02bb9cddbc083c75ba2ea65b5d377a
Time: 2020-07-16
Author: noahfahlgren@gmail.com
File Name: plantcv/plantcv/color_palette.py
Class Name:
Method Name: color_palette