mml.core.visualization.cm

render_confusion_matrix(cm: ndarray[tuple[int, ...], dtype[float64]], classes: List[str]) Figure[source]

Returns a matplotlib figure containing the plotted confusion matrix.

Parameters:
  • cm (ndarray) – the n by n confusion matrix with integer entries

  • classes (List[str]) – list of class names (same order as in the axes of the cm)

Returns:

matplotlib figure rendered the cm