{
  "$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": "# Thresholding Metrics API\n\nThis module provides utility functions to threshold model predictions.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `get_predicted_threshold_indices` | Get prediction indices that are above threshold (confidence level) |\n| `threshold_predictions` | Get thresholded predictions |",
      "name": "threshold",
      "path": "helia_edge.metrics.threshold",
      "submodules": [],
      "summary": "Thresholding Metrics API",
      "symbols": [
        {
          "description": "Get prediction indices that are above threshold (confidence level).\nThis is useful to remove weak predictions that can happen due to noisy data or poor model performance.",
          "examples": [],
          "id": "helia_edge.metrics.threshold.get_predicted_threshold_indices",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "get_predicted_threshold_indices",
          "params": [
            {
              "description": "Model output as probabilities",
              "name": "y_prob",
              "type": "npt.NDArray"
            },
            {
              "description": "Model predictions. Defaults to None.",
              "name": "y_pred",
              "type": "npt.NDArray"
            },
            {
              "default": "0.5",
              "description": "Confidence level",
              "name": "threshold",
              "type": "float"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "npt.NDArray: Indices of y_prob that satisfy threshold",
              "type": "npt.NDArray"
            }
          ],
          "signature": "get_predicted_threshold_indices(y_prob: npt.NDArray, y_pred: npt.NDArray, threshold: float = 0.5) -> npt.NDArray",
          "source": {
            "line": 16,
            "path": "helia_edge/metrics/threshold.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/metrics/threshold.py#L16"
          },
          "summary": "Get prediction indices that are above threshold (confidence level)."
        },
        {
          "description": "Get prediction indices that are above threshold (confidence level).\nThis is useful to remove weak predictions that can happen due to noisy data or poor model performance.",
          "examples": [],
          "id": "helia_edge.metrics.threshold.threshold_predictions",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "threshold_predictions",
          "params": [
            {
              "description": "Model output as probabilities",
              "name": "y_prob",
              "type": "npt.NDArray"
            },
            {
              "description": "Model predictions. Defaults to None.",
              "name": "y_pred",
              "type": "npt.NDArray"
            },
            {
              "description": "True labels",
              "name": "y_true",
              "type": "npt.NDArray"
            },
            {
              "default": "0.5",
              "description": "Confidence level. Defaults to 0.5.",
              "name": "threshold",
              "type": "float"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tuple[npt.NDArray, npt.NDArray, npt.NDArray]: Thresholded predictions",
              "type": "tuple[npt.NDArray, npt.NDArray, npt.NDArray]"
            }
          ],
          "signature": "threshold_predictions(\n    y_prob: npt.NDArray,\n    y_pred: npt.NDArray,\n    y_true: npt.NDArray,\n    threshold: float = 0.5,\n) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]",
          "source": {
            "line": 40,
            "path": "helia_edge/metrics/threshold.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/metrics/threshold.py#L40"
          },
          "summary": "Get prediction indices that are above threshold (confidence level)."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
