e650a207efc9dd33556b1b9678b043f73a18aecb,examples/model_selection/plot_confusion_matrix.py,,,#,27
Before Change
// Run classifier, using a model that is too regularized (C too low) to see
// the impact on the results
classifier = svm.SVC(kernel="linear", C=0.01)
y_pred = classifier.fit(X_train, y_train).predict(X_test)
def plot_confusion_matrix(y_true, y_pred, classes,
normalize=False,
After Change
np.set_printoptions(precision=2)
// Plot non-normalized confusion matrix
titles_options = [("Confusion matrix, without normalization", None),
("Normalized confusion matrix", "true")]
for title, normalize in titles_options:
disp = plot_confusion_matrix(classifier, X_test, y_test,
display_labels=class_names,
cmap=plt.cm.Blues,
normalize=normalize)
disp.ax_.set_title(title)
print(title)
print(disp.confusion_matrix)
plt.show()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: scikit-learn/scikit-learn
Commit Name: e650a207efc9dd33556b1b9678b043f73a18aecb
Time: 2019-11-14
Author: thomasjpfan@gmail.com
File Name: examples/model_selection/plot_confusion_matrix.py
Class Name:
Method Name:
Project Name: zo7/deconvfaces
Commit Name: 41ef0bf4ece3daf13a02b14c79eb7ddebb42bc0c
Time: 2016-09-04
Author: zo7.flynn@gmail.com
File Name: facegen/generate.py
Class Name:
Method Name: generate_from_yaml
Project Name: oddt/oddt
Commit Name: f8175e0221bbf31ffc8c10ee809b7ee2e118362d
Time: 2018-02-08
Author: maciek@wojcikowski.pl
File Name: oddt/scoring/functions/NNScore.py
Class Name: nnscore
Method Name: train