Class HitsNormMetric

All Implemented Interfaces:
EvalMetric

public class HitsNormMetric extends HitsMetric
Normalized version of HitsMetric.
Author:
Alexander Schultheis
  • Constructor Details

    • HitsNormMetric

      public HitsNormMetric()
    • HitsNormMetric

      public HitsNormMetric(int k)
  • Method Details

    • getMetricName

      public String getMetricName()
      Description copied from interface: EvalMetric
      Returns a name for the metric to be identified in any string representations.
      Specified by:
      getMetricName in interface EvalMetric
      Overrides:
      getMetricName in class HitsMetric
      Returns:
      the name of the metric
    • 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.
      Overrides:
      computeEvalKMetric in class HitsMetric
      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