Class KEvalMetric
- 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 Summary
Constructors Constructor Description KEvalMetric()KEvalMetric(int k)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doublecomputeEvalKMetric(SimpleSimilarityResult groundTruthRankingResult, SimpleSimilarityResult predictedRankingResult, Integer k)Computes a ranking metric for the top-k cases of the ranking results.doublecomputeEvalMetric(SimpleSimilarityResult groundTruthRankingResult, SimpleSimilarityResult predictedRankingResult)Computes a ranking metric for the complete ranking.intgetK()StringgetMetricName()Returns a name for the metric to be identified in any string representations.voidsetK(int k)
-
-
-
Method Detail
-
computeEvalMetric
public double computeEvalMetric(SimpleSimilarityResult groundTruthRankingResult, SimpleSimilarityResult predictedRankingResult)
Description copied from interface:EvalMetricComputes a ranking metric for the complete ranking.- Specified by:
computeEvalMetricin interfaceEvalMetric- Parameters:
groundTruthRankingResult- the ground-truth rankingpredictedRankingResult- the predicted ranking (to analyze)- Returns:
- a double score
-
getMetricName
public String getMetricName()
Description copied from interface:EvalMetricReturns a name for the metric to be identified in any string representations.- Specified by:
getMetricNamein interfaceEvalMetric- 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 rankingpredictedRankingResult- the predicted ranking results to analyzek- the number of top cases to look at- Returns:
- a score for the ranking according to this metric
-
-