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>pull/10344/head
parent
10c025d794
commit
e808f2267d
utils
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue