From 2b4b09864d17bfb0a5cbbad8039528606fc9e5ba Mon Sep 17 00:00:00 2001 From: Pavan Mandava Date: Thu, 30 Jul 2020 00:13:37 +0200 Subject: [PATCH] plot Threshold color fix --- eval/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval/metrics.py b/eval/metrics.py index 1b9cf73..f7cdb4c 100644 --- a/eval/metrics.py +++ b/eval/metrics.py @@ -190,7 +190,7 @@ def plot_confusion_matrix(confusion_mat, classifier_name, plot_file_name): plt.xticks(tick_marks, target_names, rotation=45) plt.yticks(tick_marks, target_names) - thresh = confusion_mat.max() / confusion_mat.max() / 2 + thresh = confusion_mat.max() / 2 for i, j in itertools.product(range(confusion_mat.shape[0]), range(confusion_mat.shape[1])): plt.text(j, i, "{:,}".format(confusion_mat[i, j]), horizontalalignment="center",