{
  "$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": "# Training History Plotting API\n\nThis module provides utility functions to plot training history metrics.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `plot_history_metrics` | Plot training history metrics |",
      "name": "history",
      "path": "helia_edge.plotting.history",
      "submodules": [],
      "summary": "Training History Plotting API",
      "symbols": [
        {
          "description": "Plot training history metrics returned by model.fit.\n\nExample:\n```python\n\nhistory = dict(\n    loss=[0.1, 0.2, 0.3, 0.4],\n    accuracy=[0.9, 0.8, 0.7, 0.6],\n    val_loss=[0.1, 0.2, 0.3, 0.4],\n    val_accuracy=[0.9, 0.8, 0.7, 0.6],\n)\n\nimport helia_edge as helia\n\nfig, ax = helia.plotting.plot_history_metrics(\n    history,\n    metrics=[\"loss\", \"accuracy\"],\n    include_val=True,\n    stack=False,\n)\n```",
          "examples": [],
          "id": "helia_edge.plotting.history.plot_history_metrics",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "plot_history_metrics",
          "params": [
            {
              "description": "Training history",
              "name": "history",
              "type": "dict[str, list[float]]"
            },
            {
              "description": "Metrics to plot",
              "name": "metrics",
              "type": "list[str]"
            },
            {
              "default": "None",
              "description": "Path to save plot. Defaults to None.",
              "name": "save_path",
              "type": "Path | None"
            },
            {
              "default": "True",
              "description": "Include validation metrics. Defaults to True.",
              "name": "include_val",
              "type": "bool"
            },
            {
              "default": "(9, 5)",
              "description": "Figure size. Defaults to (9, 5).",
              "name": "figsize",
              "type": "tuple[int, int]"
            },
            {
              "default": "('blue', 'orange')",
              "description": "Colors for train and val. Defaults to (\"blue\", \"orange\").",
              "name": "colors",
              "type": "tuple[str | tuple[str, str]]"
            },
            {
              "default": "False",
              "description": "Stack metrics. Defaults to False.",
              "name": "stack",
              "type": "bool"
            },
            {
              "default": "None",
              "description": "Title for plot. Defaults",
              "name": "title",
              "type": "str | None"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tuple[plt.Figure, plt.Axes]: Figure and axes handles",
              "type": "tuple[plt.Figure, plt.Axes]"
            }
          ],
          "signature": "plot_history_metrics(\n    history: dict[str, list[float]],\n    metrics: list[str],\n    save_path: Path | None = None,\n    include_val: bool = True,\n    figsize: tuple[int, int] = (9, 5),\n    colors: tuple[str | tuple[str, str]] = ('blue', 'orange'),\n    stack: bool = False,\n    title: str | None = None,\n    **kwargs={},\n) -> tuple[plt.Figure, plt.Axes]",
          "source": {
            "line": 19,
            "path": "helia_edge/plotting/history.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/plotting/history.py#L19"
          },
          "summary": "Plot training history metrics returned by model.fit."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
