Class HitsMetric

  • All Implemented Interfaces:
    EvalMetric
    Direct Known Subclasses:
    HitsNormMetric

    public class HitsMetric
    extends KEvalMetric
    Metric that returns the number of hits (not normalized).
    Author:
    Maximilian Hoffmann
    • Constructor Detail

      • HitsMetric

        public HitsMetric()
      • HitsMetric

        public HitsMetric​(int k)
    • Method Detail

      • computeEvalKMetric

        public double computeEvalKMetric​(SimpleSimilarityResult groundTruthRankingResult,
                                         SimpleSimilarityResult predictedRankingResult,
                                         Integer k)
        Description copied from class: KEvalMetric
        Computes a ranking metric for the top-k cases of the ranking results.
        Specified by:
        computeEvalKMetric in class KEvalMetric
        Parameters:
        groundTruthRankingResult - the ground-truth ranking
        predictedRankingResult - the predicted ranking results to analyze
        k - the number of top cases to look at
        Returns:
        a score for the ranking according to this metric