Class EvaluatorRank
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.EvaluatorRank
A rank evaluator which writes a file resultsRanking.csv.
It contains the rankings for each executed testcase.
Currently it contains DCG, nDCG, MAP in three variants:
random, alphabetically, top (this only comes into play when there are correspondences with the same confidence).
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
Refinement operations to be applied.static final String
The CSV file name which will be written to the results directory.private SameConfidenceRanking[]
The strategies to be evaluated for cases in which two correspondences carry the same confidence. -
Constructor Summary
ConstructorDescriptionEvaluatorRank
(ExecutionResultSet results) Convenience Constructor.EvaluatorRank
(ExecutionResultSet results, SameConfidenceRanking... sameConfidenceRankingList) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprivate void
runMetricAndPrintToFile
(RankingMetric[] metrics, ExecutionResult executionResult, String refinerString, org.apache.commons.csv.CSVPrinter printer) Runs the metric on the given result and prints a line to the CSV file.void
setRefinerList
(List<Refiner[]> refinerList) void
writeResultsToDirectory
(File baseDirectory) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
checkAndCreateDirectory, getDefaultResultsDirectory, getDirectoryWithCurrentTime, getResults, getResultsDirectoryTrack, getResultsDirectoryTrackMatcher, getResultsDirectoryTrackTestcaseMatcher, setDefaultResultsDirectory, writeToDirectory, writeToDirectory, writeToDirectory
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
sameConfidenceRankingList
The strategies to be evaluated for cases in which two correspondences carry the same confidence. -
RESULT_FILE_NAME
The CSV file name which will be written to the results directory.- See Also:
-
refinerList
Refinement operations to be applied.
-
-
Constructor Details
-
EvaluatorRank
public EvaluatorRank(ExecutionResultSet results, SameConfidenceRanking... sameConfidenceRankingList) Constructor- Parameters:
results
- The results to be evaluated.sameConfidenceRankingList
- The confidence ranking strategies to be applied in case of multiple correspondences with the same confidence. If multiple strategies are given, all will be evaluated and appear in the resulting CSV file (for comparison).
-
EvaluatorRank
Convenience Constructor. Clashes with multiple correspondences carrying the same score will be resolved by alphabetical ordering.- Parameters:
results
- The execution result set.
-
-
Method Details
-
writeResultsToDirectory
- Specified by:
writeResultsToDirectory
in classEvaluator
-
runMetricAndPrintToFile
private void runMetricAndPrintToFile(RankingMetric[] metrics, ExecutionResult executionResult, String refinerString, org.apache.commons.csv.CSVPrinter printer) throws IOException Runs the metric on the given result and prints a line to the CSV file.- Parameters:
metrics
- Metrics for evaluation.executionResult
- Refined result for evaluation.refinerString
- String identifying the refinement operations that have been performed.printer
- Printer to be used for printing.- Throws:
IOException
- IOException may be thrown while printing.
-
getRefinerList
-
setRefinerList
-