evalml.model_understanding.graph_confusion_matrix¶
-
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’.
- Parameters
y_true (pd.Series or np.ndarray) – True binary labels.
y_pred (pd.Series or np.ndarray) – Predictions from a binary classifier.
normalize_method ({'true', 'pred', 'all', None}) – Normalization method to use, if not None. 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. Defaults to None.
- Returns
plotly.Figure representing the confusion matrix plot generated