I have this code:
TP = len(set1)
FP = len(set2)
FN = len(set3)
if FP == 0:
Score = ((2*TP)/((2*TP)+FN))
print "Warning: FP is equal 0."
elif FN == 0:
Score = ((2*TP)/((2*TP)+FP))
print "Warning: FN is equal 0"
elif TP == 0:
Score = ((2*TP)/((2*TP)+FP+FN))
print "Warning: TP is equal 0"
else:
Score = ((2*TP)/((2*TP)+FP+FN))
print " The Score is = ", Score
But for some reason my Score returns 0 every time. I checked the values and everything seems correct. Anyone could help me??