SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def print_stats(y_true, y_pred):
  2.     print(f'Total accuracy: {accuracy_score(y_true, y_pred)}')
  3.     print()
  4.     cm = pd.DataFrame(confusion_matrix(y_true, y_pred),
  5.                       columns=pd.MultiIndex.from_arrays([['not_fit', 'fit']], names=['My fit']),
  6.                       index=['not_fit', 'fit'],
  7.                  )
  8.     cm.index.name = 'Toloka fit'
  9.     print('Confusion matrix')
  10.     print(cm)
  11.     print()
  12.     print('Classification report')
  13.     print(classification_report(y_true, y_pred))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top