From e808f2267d0164edb7bc45588c4fcda68c3dd8cb Mon Sep 17 00:00:00 2001 From: Hu Ye Date: Wed, 30 Nov 2022 11:32:34 +0800 Subject: [PATCH] Eliminate unused `ConfusionMatrix.matrix()` method (#10309) * fix bug in confusion_matrix Signed-off-by: Hu Ye * Update metrics.py * Update metrics.py * Update metrics.py Signed-off-by: Hu Ye Co-authored-by: Glenn Jocher --- utils/metrics.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/metrics.py b/utils/metrics.py index 0be4625..c01f823 100644 --- a/utils/metrics.py +++ b/utils/metrics.py @@ -177,9 +177,6 @@ class ConfusionMatrix: if not any(m1 == i): self.matrix[dc, self.nc] += 1 # predicted background - def matrix(self): - return self.matrix - def tp_fp(self): tp = self.matrix.diagonal() # true positives fp = self.matrix.sum(1) - tp # false positives