evalml.pipelines.normalize_confusion_matrix

evalml.pipelines.normalize_confusion_matrix(conf_mat, option='true')[source]

Normalizes a confusion matrix.

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

  • option ({'true', 'pred', 'all'}) – Option to normalize over the rows (‘true’), columns (‘pred’) or all (‘all’) values. Defaults to ‘true’.

Returns

A normalized version of the input confusion matrix.