evalml.model_understanding.graph_confusion_matrix(y_true, y_pred, normalize_method='true', title_addition=None)[source]

Generate and display a confusion matrix plot.

If normalize_method is set, hover text will show raw count, otherwise hover text will show count normalized with method ‘true’.

  • y_true (pd.Series or np.array) – True binary labels.

  • y_pred (pd.Series or np.array) – Predictions from a binary classifier.

  • normalize_method ({'true', 'pred', 'all'}) – Normalization method. Supported options are: ‘true’ to normalize by row, ‘pred’ to normalize by column, or ‘all’ to normalize by all values. Defaults to ‘true’.

  • title_addition (str or None) – if not None, append to plot title. Default None.


plotly.Figure representing the confusion matrix plot generated