(tn, fp, fn, tp)
return 2 * tp / (2 * tp + fp + fn)
f1 score from confusion matrix
f1 score from confusion matrix
f1 score from confusion matrix
def f1_score(tn, fp, fn, tp):
  '''  f1 score from confusion matrix '''
  del tn
  return 2 * tp / (2 * tp + fp + fn)
def f1_score ( tn , fp , fn , tp ) : del tn return 2 * tp / ( 2 * tp + fp + fn )