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/ndcg.py [53:73]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def compute(
      self,
      query_ids: npt.NDArray[int],
      scores: npt.NDArray[float],
      targets: npt.NDArray[float],
  ) -> float:
    """Computes NDCG.

    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 relevance score of a
        given (query, doc) pair.

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



