clearbox/metrics/auroc.py [29:48]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def compute(
      self,
      query_ids: npt.NDArray[int],
      scores: npt.NDArray[float],
      targets: npt.NDArray[float],
  ) -> float:
    """Computes AUROC.

    Args:
      query_ids: Numpy array where each component corresponds to the unique
        integer ID of the query of a given (query, doc) pair. Ignored by AUROC.
      scores: Numpy array where each component corresponds to the predicted
        score of a given (query, doc) pair. Each score is a float from 0 to 1.
      targets: Numpy array where each component represent a binary label
        indicator of a given (query, doc) pair.

    Returns:
      AUROC value, float between 0 and 1 inclusively.
    """
    self._validate_compute_args(query_ids, scores, targets)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



clearbox/metrics/average.py [53:75]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def compute(
      self,
      query_ids: npt.NDArray[int],
      scores: npt.NDArray[float],
      targets: npt.NDArray[float],
  ) -> float:
    """Computes the average of the values produced by `metrics`.

    Args:
      query_ids: Numpy array where each component corresponds to the unique
        integer ID of the query of a given (query, doc) pair.
      scores: Numpy array where each component corresponds to the predicted
        score of a given (query, doc) pair. Larger score means better relevance
        of the `doc` for the `query`.
      targets: Numpy array where each component represent a golden score for
        this particular (query, doc) pair. Exact interpretation of the score is
        to be defined and described by the classes of `metrics`.

    Returns:
      Metric value as a float, bounds and meaning of it is to be defined by the
        classes of `metrics`.
    """
    self._validate_compute_args(query_ids, scores, targets)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



