accuracy, probl this is more correct
This commit is contained in:
parent
9d51bfd81f
commit
09a3640172
@ -48,13 +48,21 @@ def accuracy():
|
||||
global document_count
|
||||
i = 0
|
||||
ok_recognized = 0
|
||||
wrong_recognized = 0
|
||||
for conf in conf_matr:
|
||||
ok_recognized += conf[i]
|
||||
j = 0
|
||||
for c in conf:
|
||||
if i == j:
|
||||
ok_recognized += c
|
||||
else:
|
||||
wrong_recognized += c
|
||||
j += 1
|
||||
|
||||
i += 1
|
||||
|
||||
#print ok_recognized
|
||||
#print document_count
|
||||
accuracy = float(ok_recognized) / float(document_count)
|
||||
accuracy = float(ok_recognized) / float(wrong_recognized)
|
||||
|
||||
def prec():
|
||||
#per class -> positive matches / alle matches auf class
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user