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


        self.confusion_matrix_ = confusion_matrix_metric(
            y, y_pred, labels=labels, sample_weight=self.sample_weight
        )
        self.class_counts_ = dict(zip(*np.unique(y, return_counts=True)))

        // Make array of only the classes actually being used.
        // Needed because sklearn confusion_matrix only returns counts for
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: J535D165/recordlinkage
Commit Name: f0abbde5a393b8781919a2c33474757c07cfee8f
Time: 2016-01-02
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/indexing.py
Class Name:
Method Name: _sortedneighbourhood


Project Name: datascienceinc/Skater
Commit Name: 5601c4bb909b4146327fa68c6d5b668f997baaff
Time: 2017-03-21
Author: aikramer2@gmail.com
File Name: pyinterpret/data/dataset.py
Class Name: DataSet
Method Name: _build_metastore