evalml.pipelines.graph_confusion_matrix

evalml.pipelines.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’.

Parameters
  • 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.

Returns

plotly.Figure representing the confusion matrix plot generated