accuracy, probl this is more correct

This commit is contained in:
Ulf Gebhardt 2013-06-16 14:39:00 +02:00
parent 9d51bfd81f
commit 09a3640172

View File

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