Sklearn Classification Metrics

Python

A code snippet showing how to output a range of classification evaluation metrics from Sklearn.

 1|  from sklearn.metrics import classification_report, log_loss, roc_auc_score
 2|  
 3|  print('Classification Report:',classification_report(y_test, y_pred))
 4|  print('Log Loss:',log_loss(y_test, y_pred))
 5|  print('ROC AUC:',roc_auc_score(y_test, y_pred))
Did you find this snippet useful?

Sign up for free to to add this to your code library