java.lang.Object
de.uni_trier.wi2.procake.utils.eval.metrics.k.KEvalMetric
de.uni_trier.wi2.procake.utils.eval.metrics.k.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 Details

    • HitsMetric

      public HitsMetric()
    • HitsMetric

      public HitsMetric(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 KEvalMetric
      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.
      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