Skip to content

Commit 739a6bf

Browse files
author
Rein Appeldoorn
committed
fix(confusion_matrix): Use correct labels on axis
1 parent ab352d7 commit 739a6bf

File tree

1 file changed

+1
-2
lines changed
  • image_recognition_analysis/src/image_recognition_analysis

1 file changed

+1
-2
lines changed

image_recognition_analysis/src/image_recognition_analysis/plots.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ def plot_confusion_matrix(labels, classifications_ground_truth, classifications_
1414
"""
1515
plt.figure()
1616

17-
cnf_matrix = confusion_matrix(classifications_ground_truth, classifications_predicted_label)
17+
cnf_matrix = confusion_matrix(classifications_ground_truth, classifications_predicted_label, labels)
1818

1919
# Plot normalized confusion matrix
20-
2120
plt.imshow(cnf_matrix, interpolation='nearest', cmap=plt.cm.Blues)
2221
plt.colorbar()
2322
tick_marks = np.arange(len(labels))

0 commit comments

Comments
 (0)