evalml.model_understanding.normalize_confusion_matrix

evalml.model_understanding.normalize_confusion_matrix(conf_mat, normalize_method='true')[source]

Normalizes a confusion matrix.

Parameters
  • conf_mat (pd.DataFrame or np.array) – Confusion matrix to normalize.

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

Returns

normalized version of the input confusion matrix. The column header represents the predicted labels while row header represents the actual labels.

Return type

pd.DataFrame