FINAL HOMEWORK JENKINS2 DONE!!! :)
This commit is contained in:
parent
b9884700a8
commit
b553894099
@ -61,10 +61,10 @@ if __name__ == "__main__":
|
|||||||
FP.append(d)
|
FP.append(d)
|
||||||
else:
|
else:
|
||||||
FN.append(d)
|
FN.append(d)
|
||||||
f_score = len(TP) / (len(TP) + 0.5 * (len(FP) + len(FN)))
|
f_score = len(TP) / (len(TP) + 0.5 * (len(FP) + len(FN)) +0.00001 )
|
||||||
accuracy = (len(TP) + len(TF)) / (len(TP) + len(TF) + len(FP) + len(FN))
|
accuracy = (len(TP) + len(TF)) / (len(TP) + len(TF) + len(FP) + len(FN) +0.00001 )
|
||||||
precision = len(TP) / ( len(TP) + len(FP) )
|
precision = len(TP) / ( len(TP) + len(FP) +0.00001 )
|
||||||
recall = len(TP) / ( len(TP) + len(FN) )
|
recall = len(TP) / ( len(TP) + len(FN)+0.00001 )
|
||||||
print(f"F- score = {f_score}")
|
print(f"F- score = {f_score}")
|
||||||
print(f"Accuracy = {accuracy}")
|
print(f"Accuracy = {accuracy}")
|
||||||
print(f"Precision = {precision}")
|
print(f"Precision = {precision}")
|
||||||
|
Loading…
Reference in New Issue
Block a user