function
Generate multilabel confusion matrix plot via matplotlib/seaborn
multilabel_confusion_matrix_plot( y_true: npt.NDArray, y_pred: npt.NDArray, labels: list[str], save_path: os.PathLike | None = None, normalize: Literal['true', 'pred', 'all'] | None = False, max_cols: int = 5, **kwargs={},) -> tuple[plt.Figure, plt.Axes] | NoneGenerate multilabel confusion matrix plot via matplotlib/seaborn
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
y_true | npt.NDArray | Required | True y labels |
y_pred | npt.NDArray | Required | Predicted y labels |
labels | list[str] | Required | Label names |
save_path | str | None | None | Path to save plot. Defaults to None. |
normalize | Literal['true', 'pred', 'all'] | None | False | Normalize. Defaults to False. |
max_cols | int | 5 | Max columns. Defaults to 5. |
Returns
| Type | Description |
|---|---|
tuple[plt.Figure, plt.Axes] | None | tuple[plt.Figure, plt.Axes] | None: Figure and axes |