evalml.model_understanding.confusion_matrix¶
-
evalml.model_understanding.
confusion_matrix
(y_true, y_predicted, normalize_method='true')[source]¶ Confusion matrix for binary and multiclass classification.
- 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’.
- Returns
Confusion matrix. The column header represents the predicted labels while row header represents the actual labels.
- Return type
pd.DataFrame