scikit-learn provides a helpful built-in function to generate a global classification report based on the most common evaluation metrics. This is an example using binary logistic regression:
from sklearn.metrics import classification_reportprint(classification_report(Y_test, lr.predict(X_test))) precision recall f1-score support0 0.98 0.95 0.97 631 0.95 0.98 0.97 62avg / total 0.97 0.97 0.97 125
The first column represents the classes and, for each of them, precision, recall, f1-score, and support (number of assigned samples) are computed. The last row shows the average values corresponding to every column. I highly recommend this function instead of the single metrics because of its compactness and completeness. ...