Eliminate unused ConfusionMatrix.matrix() method (#10309)

* 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>
This commit is contained in:
Hu YeandGlenn Jocher authored and GitHub committed 2022-11-29 19:32:34 -08:00
1 parent 10c025d794
commit e808f2267d
1 file changed
-3
-3
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