Class RankingMetric
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.Metric<RankingResult>
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.ranking.RankingMetric
A metric which computes multiple rank metrics such as the NDCG and average precision for an execution result.
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
An indicator that determines whetherRankingResult.kOfHitsAtK
has been manually set.private int
The K of HITS@K.private static final double
private static final org.slf4j.Logger
protected SameConfidenceRanking
The strategy to use in case there are multiple correspondences with the same confidence. -
Constructor Summary
ConstructorDescriptionRankingMetric
(SameConfidenceRanking sameConfidenceRanking) ConstructorRankingMetric
(SameConfidenceRanking sameConfidenceRanking, int kOfHitsAtK) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected RankingResult
compute
(ExecutionResult executionResult) protected double
computeIDCG
(int n) protected double
getAverage
(List<Double> list) protected Alignment
getSystemResultReducedToGoldStandardEntities
(ExecutionResult executionResult) Return the system alignment but only with correspondences where the source or the target appear also in the gold standard.protected static <T> Set<T>
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LOG_OF_2
private static final double LOG_OF_2 -
sameConfidenceRanking
The strategy to use in case there are multiple correspondences with the same confidence. -
isKofHitsAtKmanuallySet
private boolean isKofHitsAtKmanuallySetAn indicator that determines whetherRankingResult.kOfHitsAtK
has been manually set. This is important because if it has not been manually set, the value of K for all HITS@K-based KPIs will determined according to the size of the reference alignment. -
kOfHitsAtK
private int kOfHitsAtKThe K of HITS@K. The hits are saved inRankingResult.hitsAtK
-
-
Constructor Details
-
RankingMetric
Constructor- Parameters:
sameConfidenceRanking
- The strategy to use in case there are multiple correspondences with the same confidence.kOfHitsAtK
- The X of HITS@X.
-
RankingMetric
Constructor- Parameters:
sameConfidenceRanking
- The strategy to use in case there are multiple correspondences with the same confidence.
-
-
Method Details
-
compute
- Specified by:
compute
in classMetric<RankingResult>
-
computeIDCG
protected double computeIDCG(int n) -
getSystemResultReducedToGoldStandardEntities
Return the system alignment but only with correspondences where the source or the target appear also in the gold standard.- Parameters:
executionResult
- execution result to use- Returns:
- reduced system alignment
-
makeSet
-
getAverage
-