Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def print_stats(y_true, y_pred):
- print(f'Total accuracy: {accuracy_score(y_true, y_pred)}')
- print()
- cm = pd.DataFrame(confusion_matrix(y_true, y_pred),
- columns=pd.MultiIndex.from_arrays([['not_fit', 'fit']], names=['My fit']),
- index=['not_fit', 'fit'],
- )
- cm.index.name = 'Toloka fit'
- print('Confusion matrix')
- print(cm)
- print()
- print('Classification report')
- print(classification_report(y_true, y_pred))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement