{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "f341fb11f7f5d77a4974ba8273c4cd55d67c21f0",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "# Confusion Matrix Plotting API\n\nThis module provides utility functions to plot confusion matrices.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `multilabel_confusion_matrix_plot` | Generate multilabel confusion matrix plot via matplotlib/seaborn |\n| `confusion_matrix_plot` | Generate confusion matrix plot via matplotlib/seaborn |\n| `px_plot_confusion_matrix` | Generate confusion matrix plot via plotly |",
      "name": "cm",
      "path": "helia_edge.plotting.cm",
      "submodules": [],
      "summary": "Confusion Matrix Plotting API",
      "symbols": [
        {
          "description": "Generate multilabel confusion matrix plot via matplotlib/seaborn",
          "examples": [],
          "id": "helia_edge.plotting.cm.multilabel_confusion_matrix_plot",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "multilabel_confusion_matrix_plot",
          "params": [
            {
              "description": "True y labels",
              "name": "y_true",
              "type": "npt.NDArray"
            },
            {
              "description": "Predicted y labels",
              "name": "y_pred",
              "type": "npt.NDArray"
            },
            {
              "description": "Label names",
              "name": "labels",
              "type": "list[str]"
            },
            {
              "default": "None",
              "description": "Path to save plot. Defaults to None.",
              "name": "save_path",
              "type": "str | None"
            },
            {
              "default": "False",
              "description": "Normalize. Defaults to False.",
              "name": "normalize",
              "type": "Literal['true', 'pred', 'all'] | None"
            },
            {
              "default": "5",
              "description": "Max columns. Defaults to 5.",
              "name": "max_cols",
              "type": "int"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tuple[plt.Figure, plt.Axes] | None: Figure and axes",
              "type": "tuple[plt.Figure, plt.Axes] | None"
            }
          ],
          "signature": "multilabel_confusion_matrix_plot(\n    y_true: npt.NDArray,\n    y_pred: npt.NDArray,\n    labels: list[str],\n    save_path: os.PathLike | None = None,\n    normalize: Literal['true', 'pred', 'all'] | None = False,\n    max_cols: int = 5,\n    **kwargs={},\n) -> tuple[plt.Figure, plt.Axes] | None",
          "source": {
            "line": 30,
            "path": "helia_edge/plotting/cm.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/plotting/cm.py#L30"
          },
          "summary": "Generate multilabel confusion matrix plot via matplotlib/seaborn"
        },
        {
          "description": "Generate confusion matrix plot via matplotlib/seaborn",
          "examples": [],
          "id": "helia_edge.plotting.cm.confusion_matrix_plot",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "confusion_matrix_plot",
          "params": [
            {
              "description": "True y labels",
              "name": "y_true",
              "type": "npt.NDArray"
            },
            {
              "description": "Predicted y labels",
              "name": "y_pred",
              "type": "npt.NDArray"
            },
            {
              "description": "Label names",
              "name": "labels",
              "type": "list[str]"
            },
            {
              "default": "None",
              "description": "Path to save plot. Defaults to None.",
              "name": "save_path",
              "type": "str | None"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tuple[plt.Figure, plt.Axes] | None: Figure and axes",
              "type": "tuple[plt.Figure, plt.Axes] | None"
            }
          ],
          "signature": "confusion_matrix_plot(\n    y_true: npt.NDArray,\n    y_pred: npt.NDArray,\n    labels: list[str],\n    save_path: os.PathLike | None = None,\n    normalize: Literal['true', 'pred', 'all'] | None = False,\n    **kwargs={},\n) -> tuple[plt.Figure, plt.Axes] | None",
          "source": {
            "line": 99,
            "path": "helia_edge/plotting/cm.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/plotting/cm.py#L99"
          },
          "summary": "Generate confusion matrix plot via matplotlib/seaborn"
        },
        {
          "description": "Generate confusion matrix plot via plotly",
          "examples": [],
          "id": "helia_edge.plotting.cm.px_plot_confusion_matrix",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "px_plot_confusion_matrix",
          "params": [
            {
              "description": "True y labels",
              "name": "y_true",
              "type": "npt.NDArray"
            },
            {
              "description": "Predicted y labels",
              "name": "y_pred",
              "type": "npt.NDArray"
            },
            {
              "description": "Label names",
              "name": "labels",
              "type": "list[str]"
            },
            {
              "default": "False",
              "description": "Normalize. Defaults to False.",
              "name": "normalize",
              "type": "Literal['true', 'pred', 'all'] | None"
            },
            {
              "default": "None",
              "description": "Path to save plot. Defaults to None.",
              "name": "save_path",
              "type": "os.PathLike | None"
            },
            {
              "default": "None",
              "description": "Title. Defaults to None.",
              "name": "title",
              "type": "str | None"
            },
            {
              "default": "None",
              "description": "Width. Defaults to None.",
              "name": "width",
              "type": "int | None"
            },
            {
              "default": "400",
              "description": "Height. Defaults to 400.",
              "name": "height",
              "type": "int | None"
            },
            {
              "default": "'rgba(38,42,50,1.0)'",
              "description": "Background color. Defaults to \"rgba(38,42,50,1.0)\".",
              "name": "bg_color",
              "type": "str"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "go.Figure: Plotly figure",
              "type": "go.Figure"
            }
          ],
          "signature": "px_plot_confusion_matrix(\n    y_true: npt.NDArray,\n    y_pred: npt.NDArray,\n    labels: list[str],\n    normalize: Literal['true', 'pred', 'all'] | None = False,\n    save_path: os.PathLike | None = None,\n    title: str | None = None,\n    width: int | None = None,\n    height: int | None = 400,\n    bg_color: str = 'rgba(38,42,50,1.0)',\n) -> go.Figure",
          "source": {
            "line": 140,
            "path": "helia_edge/plotting/cm.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/plotting/cm.py#L140"
          },
          "summary": "Generate confusion matrix plot via plotly"
        }
      ]
    }
  ],
  "name": "helia_edge"
}
