Class MatcherSimilarityMetric
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.resultsSimilarity.MatcherSimilarityMetric
This metric allows to compare system results similarity by calculating the jaccard overlap between
alignment results.
- Author:
- Jan Portisch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Indicator on whether Micro or Macro average shall be used for aggregation operations. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
computeSimilarity
(ExecutionResult executionResult_1, ExecutionResult executionResult_2) Computes the Jaccard overlap between two system results.static double
computeSimilarity
(Alignment alignment_1, Alignment alignment_2) Computes the Jaccard overlap between two alignments.get
(MatcherSimilarityMetric.CalculationMode mode, ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
.get
(ExecutionResultSet resultSet, TestCase testCase, Refiner... refiners) Obtain the matcher similarity for the givenExecutionResultSet
.private MatcherSimilarity
macroAverageMatcherSimilarity
(ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
.private MatcherSimilarity
microAverageMatcherSimilarity
(ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
.
-
Field Details
-
LOGGER
org.slf4j.Logger LOGGERDefault Logger.
-
-
Constructor Details
-
MatcherSimilarityMetric
public MatcherSimilarityMetric()
-
-
Method Details
-
get
Obtain the matcher similarity for the givenExecutionResultSet
.- Parameters:
resultSet
- The result set for which the matcher similarity shall be calculated.testCase
- The test case on whose basis the evaluation shall be performed.refiners
- The refiners for the comparison operation.- Returns:
- The similarity between matchers.
-
get
public MatcherSimilarity get(MatcherSimilarityMetric.CalculationMode mode, ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
. Results will be averaged in a micro-average fashion.- Parameters:
mode
- The mode for the calculation (i.e., micro or macro).resultSet
- The result set to be used.track
- The track for which the matcher similarity shall be aggregated.refiners
- Refiners that apply.- Returns:
- The similarity between matchers.
-
macroAverageMatcherSimilarity
private MatcherSimilarity macroAverageMatcherSimilarity(ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
. Results will be averaged in a micro-average fashion.- Parameters:
resultSet
- The result set to be used.track
- The track for which the matcher similarity shall be aggregated.refiners
- Refiners that apply.- Returns:
- The similarity between matchers.
-
microAverageMatcherSimilarity
private MatcherSimilarity microAverageMatcherSimilarity(ExecutionResultSet resultSet, Track track, Refiner... refiners) Obtain the aggregated matcher similarity for the givenExecutionResultSet
. Results will be averaged in a micro-average fashion.- Parameters:
resultSet
- The result set to be used.track
- The track for which the matcher similarity shall be aggregated.refiners
- Refiners that apply.- Returns:
- The similarity between matchers.
-
computeSimilarity
public static double computeSimilarity(ExecutionResult executionResult_1, ExecutionResult executionResult_2) Computes the Jaccard overlap between two system results.- Parameters:
executionResult_1
- Result 1.executionResult_2
- Result 2.- Returns:
- Similarity as double.
-
computeSimilarity
Computes the Jaccard overlap between two alignments.- Parameters:
alignment_1
- alignment 1.alignment_2
- alignment 2.- Returns:
- Similarity as double.
-