Class MeanReciprocalRank

java.lang.Object
org.opensearch.index.rankeval.MeanReciprocalRank
All Implemented Interfaces:
NamedWriteable, Writeable, ToXContent, ToXContentObject, EvaluationMetric

public class MeanReciprocalRank
extends java.lang.Object
implements EvaluationMetric
Metric implementing Mean Reciprocal Rank (https://en.wikipedia.org/wiki/Mean_reciprocal_rank).
By default documents with a rating equal or bigger than 1 are considered to be "relevant" for the reciprocal rank calculation. This value can be changes using the relevant_rating_threshold` parameter.
  • Field Details

  • Constructor Details

    • MeanReciprocalRank

      public MeanReciprocalRank()
    • MeanReciprocalRank

      public MeanReciprocalRank​(int relevantRatingThreshold, int k)
      Metric implementing Mean Reciprocal Rank (https://en.wikipedia.org/wiki/Mean_reciprocal_rank).
      Parameters:
      relevantRatingThreshold - the rating value that a document needs to be regarded as "relevant". Defaults to 1.
      k - the search window size all request use.
  • Method Details