astra.contrib.classifier.plot_utils¶
Module Contents¶
Functions¶
plot_confusion_matrix(y_true, y_pred, class_names, normalize=False, title=None, cmap=plt.cm.Blues) |
Plot a confusion matrix. |
-
astra.contrib.classifier.plot_utils.plot_confusion_matrix(y_true, y_pred, class_names, normalize=False, title=None, cmap=plt.cm.Blues)¶ Plot a confusion matrix.
Parameters: - y_true – An array of true (or believed) classes.
- y_pred – An array of predicted classes.
- class_names – The names associated with each class integer.
- normalize – (optional) Normalize the confusion matrix to show fractions instead of absolute values (default: False).
- title – (optional) A title for the figure.
- cmap – (optional)
A colormap for the confusion matrix (default:
plt.cm.Blues).
Returns: A figure.