(confusion)
return TN, FP, FN, TP
confusion matrix to TP, FP, TN, FN
confusion matrix to TP, FP, TN, FN
confusion matrix to TP FP TN FN
def stats_confusion(confusion):
  ''' confusion matrix to TP, FP, TN, FN '''
  FP = confusion.sum(axis=0) - np.diag(confusion)
  FN = confusion.sum(axis=1) - np.diag(confusion)
  TP = np.diag(confusion)
  TN = confusion.sum() - (TP + FN + TP)
  return TN, FP, FN, TP
def stats_confusion ( confusion ) : FP = confusion . sum ( axis = 0 ) - np . diag ( confusion ) FN = confusion . sum ( axis = 1 ) - np . diag ( confusion ) TP = np . diag ( confusion ) TN = confusion . sum ( ) - ( TP + FN + TP ) return TN , FP , FN , TP