java.lang.Object
de.uni_trier.wi2.procake.utils.eval.metrics.k.KEvalMetric
All Implemented Interfaces:
EvalMetric
Direct Known Subclasses:
HitsMetric, QualityMuellerMetric, QualityStromerMetric

public abstract class KEvalMetric extends Object implements EvalMetric
Interface for metrics that only look at the top-k cases in the ranking.
Author:
Maximilian Hoffmann
  • Constructor Details

    • KEvalMetric

      public KEvalMetric()
    • KEvalMetric

      public KEvalMetric(int k)
  • Method Details

    • computeEvalMetric

      public double computeEvalMetric(SimpleSimilarityResult groundTruthResult, SimpleSimilarityResult predictedResult)
      Description copied from interface: EvalMetric
      Computes a ranking metric for the complete ranking.
      Specified by:
      computeEvalMetric in interface EvalMetric
      Parameters:
      groundTruthResult - the ground-truth ranking
      predictedResult - the predicted ranking (to analyze)
      Returns:
      a double score
    • 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
      Returns:
      the name of the metric
    • getK

      public int getK()
    • setK

      public void setK(int k)
    • computeEvalKMetric

      public abstract double computeEvalKMetric(SimpleSimilarityResult groundTruthRankingResult, SimpleSimilarityResult predictedRankingResult, Integer k)
      Computes a ranking metric for the top-k cases of the ranking results.
      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