Class DistanceMetric

java.lang.Object
de.uni_trier.wi2.procake.utils.eval.metrics.full.DistanceMetric
All Implemented Interfaces:
EvalMetric

public class DistanceMetric extends Object implements EvalMetric
Computes the average distance in ranks between the ground-truth ranking and the predicted ranking.
Author:
Maximilian Hoffmann
  • Constructor Details

    • DistanceMetric

      public DistanceMetric()
  • 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