FINAL HOMEWORK JENKINS2 DONE!!! :)

This commit is contained in:
Mikołaj Pokrywka 2022-05-07 00:05:59 +02:00
parent b9884700a8
commit b553894099

View File

@ -61,10 +61,10 @@ if __name__ == "__main__":
FP.append(d)
else:
FN.append(d)
f_score = len(TP) / (len(TP) + 0.5 * (len(FP) + len(FN)))
accuracy = (len(TP) + len(TF)) / (len(TP) + len(TF) + len(FP) + len(FN))
precision = len(TP) / ( len(TP) + len(FP) )
recall = len(TP) / ( len(TP) + 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) +0.00001 )
precision = len(TP) / ( len(TP) + len(FP) +0.00001 )
recall = len(TP) / ( len(TP) + len(FN)+0.00001 )
print(f"F- score = {f_score}")
print(f"Accuracy = {accuracy}")
print(f"Precision = {precision}")