gigl.src.common.utils.mean_reciprocal_rank#
- gigl.src.common.utils.eval_metrics.mean_reciprocal_rank(pos_scores: FloatTensor, neg_scores: FloatTensor) FloatTensor #
Computes Mean Reciprocal Rank (MRR), evaluating 1+ positives against 1+ negatives.
- Args:
pos_scores (torch.FloatTensor): Contains 1 or more positive sample scores. neg_scores (torch.FloatTensor): Contains 1 or more negative sample scores.
- Returns:
torch.FloatTensor: Computed MRR score.