da729dab14194dba84e75571f08f927efbc19865,yellowbrick/classifier/confusion_matrix.py,ConfusionMatrix,score,#ConfusionMatrix#Any#Any#,159

Before Change


                y_pred = self.label_encoder.inverse_transform(y_pred)
            except AttributeError:
                // if a mapping is passed to class apply it here.
                y = np.array([self.label_encoder[x] for x in y])
                y_pred = np.array([self.label_encoder[x] for x in y_pred])

        // Compute the confusion matrix and class counts
        self.confusion_matrix_ = confusion_matrix_metric(

After Change


            Global accuracy score
        
        // Call super to check if fitted and to compute self.score_
        super(ConfusionMatrix, self).score(X, y)

        // Create predictions from X (will raise not fitted error)
        y_pred = self.predict(X)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: DistrictDataLabs/yellowbrick
Commit Name: da729dab14194dba84e75571f08f927efbc19865
Time: 2019-08-22
Author: benjamin@bengfort.com
File Name: yellowbrick/classifier/confusion_matrix.py
Class Name: ConfusionMatrix
Method Name: score


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/mapper/full_batch_generators.py
Class Name: FullBatchNodeGenerator
Method Name: flow


Project Name: IndicoDataSolutions/finetune
Commit Name: 0df2cf25a625d05b7590efdbbe335498b93d694d
Time: 2019-01-17
Author: madison@indico.io
File Name: finetune/target_encoders.py
Class Name: OrdinalRegressionEncoder
Method Name: fit


Project Name: biolab/orange3
Commit Name: 0ed06e0144cf027791cc1b00d73b865881145ee2
Time: 2015-02-12
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/tests/test_sparse_table.py
Class Name: InterfaceTest
Method Name: test_row_assignment