Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement