Eliminate unused `ConfusionMatrix.matrix()` method ()

* fix bug in confusion_matrix

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>

* Update metrics.py

* Update metrics.py

* Update metrics.py

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/10344/head
Hu Ye 2022-11-30 11:32:34 +08:00 committed by GitHub
parent 10c025d794
commit e808f2267d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -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